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

nlcst-normalize

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nlcst-normalize

Normalize a word for easier comparison

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

nlcst-normalize Build Status Coverage Status

Normalize a word for easier comparison, useful for NLCST

Installation

npm:

npm install nlcst-normalize

nlcst-normalize is also available for duo, and as an AMD, CommonJS, and globals module, uncompressed and compressed.

Usage

var normalize = require('nlcst-normalize');

normalize('Don’t'); // 'dont'
normalize('Don\'t'); // 'dont'
normalize('Block-level'); // 'blocklevel'

normalize({
    'type': 'WordNode',
    'children': [
        {
            'type': 'TextNode',
            'value': 'Block'
        },
        {
            'type': 'PunctuationNode',
            'value': '-'
        },
        {
            'type': 'TextNode',
            'value': 'level'
        }
    ]
}); // 'blocklevel'

API

normalize(value)

Quote a value.

Parameters

  • value (Node, Array.<Node>, or string) — Value to normalize.

Returns: string — Normalized value.

License

MIT © Titus Wormer

Keywords

FAQs

Package last updated on 14 Jan 2016

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