Package Exports
- english-a-an
- english-a-an/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 (english-a-an) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
English a/an
Determines whether a sequence (noun 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 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 custom of exceptions: map where the word is the key, and value has a
aankey with eitheraoranas a value; in general put just null here - a list of words that must be preceded by
an: useenglish-a-an-list - the word as a string
Case matters:
English=>an English, whileenglishwill not be foundan ANDmakes sense, whilea/an anddoesn't
Installation
npm install english-a-anUsage
const englishAAn = require('english-a-an');
const englishAAnList = require('english-a-an-list/dist/aan.json');
// an
console.log(englishAAn.getAAn(null, englishAAnList, 'English'));
// a
console.log(englishAAn.getAAn(null, englishAAnList, 'European'));