Package Exports
- spanish-adjectives
- spanish-adjectives/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (spanish-adjectives) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
spanish-adjectives
Agreement of Spanish adjectives, based on the gender and number.
Manages a lot of special cases:
- extensive list of nationalities: francés becomes francesas FP
- invariable: esmeralda, macho
- exceptions: joven becomes jóvenes MP
- apocopes (bueno becomes buen when placed before a M S word)
Installation
npm install spanish-adjectivesUsage
const SpanishAdjectives = require('spanish-adjectives');
// negras
console.log(SpanishAdjectives.agreeAdjective('negro', 'F', 'P'));
// daneses
console.log(SpanishAdjectives.agreeAdjective('danés', 'M', 'P'));One main function agreeAdjective that takes multiple parameters and return the agreed adjective:
adjective: the adjective to agree; it must be the lemma, not the agreed formgendergender of the word;MFnumber: number of the word;SorPprecedesNoun: puttrueif the adjective will precede the noun; defaultfalse; used for apocopes