English a/an
Determines whether a sequence (word or adjective) should start with a
or an
: an elephant, a European, an Irishman, an heir, etc.
It is based on a list of words or adjectives that must be preceded by an
: use english-a-an-list
as that list.
Usage
getAAn
will return either a
or an
based on:
- a list of words or adjectives that must be preceded by
an
: use english-a-an-list
- the word or adjective as a string
Case matters:
English
=> an English
, while english
will not be foundan AND
makes sense, while a/an and
doesn't
Installation
npm install english-a-an
Usage
const englishAAn = require('english-a-an');
const englishAAnList = require('english-a-an-list');
console.log(englishAAn.getAAn(englishAAnList, 'English'));
console.log(englishAAn.getAAn(englishAAnList, 'European'));