Skip to content

A nodejs module for extracting partial name of an entity name.

Notifications You must be signed in to change notification settings

mitica/partial-name

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

partial-name

A nodejs module for extracting partial name of an entity name.

API

partialName(name: string, options?: { lang?: string, country?: string, actions?: Action[] }): string

Extracts partial name of a name.

Usage

import { partialName } from 'partial-name';

partialName('New York, N.Y.'); // => New York
partialName('New York (album)'); // => New York
partialName('President of the Parliament'); // => President

partialName('Partidul Comuniștilor din Republica Moldova', { lang: 'ro' });
// => Partidul Comuniștilor
partialName('Partidul Comuniștilor din Republica Moldova', { lang: 'ro', country: 'ro' });
// => Partidul Comuniștilor din Republica Moldova

About

A nodejs module for extracting partial name of an entity name.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published