Neurotic Pink Mongooses

    spanish-determiners
    TypeScript icon, indicating that this package has built-in type declarations

    2.2.2 • Public • Published

    spanish-determiners

    A simple Node.js module that contains Spanish determiners.

    For instance el is the definite article for masculine singular.

    It exposes a single function, getDet, that takes 3 arguments:

    • determiner type (string, mandatory): DEFINITE INDEFINITE DEMONSTRATIVE or POSSESSIVE
    • gender of the object (string, mandatory): M for masculine, F for feminine
    • number of the object (string, mandatory): S for singular, P for plural
    • the word (noun or adjective) that will come after the determiner; it is used only when type is DEFINITE or INDEFINITE to manage feminine el case (el agua)
    • the type of distance, when DEMONSTRATIVE: PROXIMAL, MEDIAL or DISTAL, PROXIMAL is the default

    POSSESSIVE only works for 3rd person S or P (generates su or sus, depending of the possessed object, not the possessor), thus information about the owner is not required.

    Installation

    npm install spanish-determiners

    Usage

    const determiners = require('spanish-determiners');
    
    // el
    console.log(determiners.getDet('DEFINITE', 'M', 'S', 'hombre', null));
    
    // el
    console.log(determiners.getDet('DEFINITE', 'F', 'S', 'agua', null));
    
    // aquella
    console.log(determiners.getDet('DEMONSTRATIVE', 'F', 'S', null, 'DISTAL'));

    See test.js for examples.

    Install

    npm i spanish-determiners

    DownloadsWeekly Downloads

    1,543

    Version

    2.2.2

    License

    Apache-2.0

    Unpacked Size

    21.5 kB

    Total Files

    6

    Last publish

    Collaborators

    • ludan.stoeckle