Socket
Socket
Sign inDemoInstall

nameparse-js

Package Overview
Dependencies
1
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    nameparse-js

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


Version published
Weekly downloads
1
Maintainers
1
Install size
703 kB
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 26 Apr 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc