Skip to content

Latest commit

 

History

History
50 lines (36 loc) · 1.05 KB

README.md

File metadata and controls

50 lines (36 loc) · 1.05 KB

jsESverb

Library to conjugate verbs in spanish

To do that library I have use code from https://github.com/voldmar/conjugation

Load

<script src="jsESverbsIrregular.js" charset="UTF-8"></script> //List of irregular forms of verbs
<script src="jsESverbList.js" charset="UTF-8"></script> //List of all infinitives
<script src="jsESverb.js" charset="UTF-8"></script> 
var verb = new jsESverb();

Example

var verb = new jsESverb();
var result1 = verb.conjugate(word);
var result2 = verb.isVerb(word);

Interface

conjugate(word);

Return all forms of one verb

word: verb in infinitive

stemText(word, showFalses);

Return array of posibles form of the verb, each array have 4 items:

  1. conjugation (ar,er,ir)
  2. tense
  3. infinitive
  4. in list (true if infinitive is in the list of jsESverbList.js, false if isn't)

word: verb to find the form

showFalses: true if returns item with 'in list' false.

Demo

Here