Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

english-a-an

Package Overview
Dependencies
Maintainers
0
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

english-a-an

English a/an indefinite articles, based on WordNet

  • 3.3.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
122
decreased by-56.12%
Maintainers
0
Weekly downloads
 
Created
Source

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 aan key with either a or an as a value; in general put just null here
  • a list of words that must be preceded by an: use english-a-an-list
  • the word as a string

Case matters:

  • English => an English, while english will not be found
  • an 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/dist/aan.json');

// an
console.log(englishAAn.getAAn(null, englishAAnList, 'English'));

// a
console.log(englishAAn.getAAn(null, englishAAnList, 'European'));

Keywords

FAQs

Package last updated on 29 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc