english-determiners
v5.3.0
Published
English determiners
Downloads
762
Readme
english-determiners
A simple Node.js module that contains English determiners.
For instance the is the definite article for singular.
It exposes a single function, getDet
, that takes 3 arguments:
- determiner type (string, mandatory):
DEFINITE
INDEFINITE
DEMONSTRATIVE
orPOSSESSIVE
- when
POSSESSIVE
:- gender of the owner (string):
M
F
orN
- number of the owner (string):
S
orP
- gender of the owner (string):
- number of the owned (string):
S
orP
- distance (string, optional, only used for
DEMONSTRATIVE
):NEAR
(this these) orFAR
(that those) - boolean to force usage of the when
DEFINITE
plural (default is false: no article when definite plural)
Installation
npm install english-determiners
Usage
var determiners = require('english-determiners');
// the
console.log( determiners.getDet('DEFINITE', null, null, 'S', null) );
// those
console.log( determiners.getDet('DEMONSTRATIVE', null, null, 'P', 'FAR') );
// their
console.log( determiners.getDet('POSSESSIVE', null, 'P', 'S', null) );
See test.js
for examples.
dependencies
no dependency