🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
n

nameparse-js

A Javascript / Typescript SDK for the www.nameparse.com service.

1.0.0
latest
69

Supply Chain Security

100

Vulnerability

88

Quality

76

Maintenance

100

License

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Issues
11

Javascript / Node SDK written in Typescript for the NameParse Service

A fast way to add the www.nameparse.com service into your Javascript / Typescript / Node projects.

Installation

The recommended way to install the NameParse SDK is through Composer.

npm install nameparse-js

Usage

const np = new NameParse({ key: NAMEPARSE_KEY });
const results = await np.parse("Chris Schuld");
console.log(results);

output:

{
    id: 'LeMKGGKp2o2yCGQNzLZriW',
    name: 'Chris Schuld',
    first: 'Chris',
    middle: '',
    last: 'Schuld',
    cached: false
}

Usage with Details

You can also ask the API for the extended details from the parse

const np = new NameParse({ key: NAMEPARSE_KEY, details: true });
const results = await np.parse("Chris Schuld");
console.log(results);

output:

{
    id: 'Ax323GGKp212yCGQxLZriW',
    name: 'Chris Schuld',
    first: 'Chris',
    middle: '',
    last: 'Schuld',
    details: {
        given: 'Chris',
        sur: 'Schuld',
        middle: '',
        title: '',
        initials: '',
        suffix: '',
        precursor: ''
    },
    cached: false
}

Tests

Tests are executed via Jest.

npm run test

FAQs

Package last updated on 26 Apr 2020

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