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

nlcst-normalize

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nlcst-normalize - npm Package Compare versions

Comparing version 3.0.0 to 3.1.0

14

index.d.ts
/**
* @param {string|Node|Array.<Node>} node
* @param {string|Node|Array.<Content>} node
* @param {NormalizeOptions} [options={}]
*/
export function normalize(
node: string | Node | Array<Node>,
options?: NormalizeOptions
node: string | Node | Array<Content>,
options?: NormalizeOptions | undefined
): string
export type Node = import('unist').Node
export type Root = import('nlcst').Root
export type Content = import('nlcst').Content
export type Node = Root | Content
export type NormalizeOptions = {
allowDashes?: boolean
allowApostrophes?: boolean
allowDashes?: boolean | undefined
allowApostrophes?: boolean | undefined
}
/**
* @typedef {import('unist').Node} Node
* @typedef {import('nlcst').Root} Root
* @typedef {import('nlcst').Content} Content
* @typedef {Root|Content} Node
*

@@ -12,7 +14,7 @@ * @typedef {Object} NormalizeOptions

/**
* @param {string|Node|Array.<Node>} node
* @param {string|Node|Array.<Content>} node
* @param {NormalizeOptions} [options={}]
*/
export function normalize(node, options) {
var value = (typeof node === 'string' ? node : toString(node))
let value = (typeof node === 'string' ? node : toString(node))
.toLowerCase()

@@ -19,0 +21,0 @@ .replace(/’/g, "'")

{
"name": "nlcst-normalize",
"version": "3.0.0",
"version": "3.1.0",
"description": "nlcst utility to normalize a word for easier comparison",

@@ -33,3 +33,3 @@ "license": "MIT",

"dependencies": {
"@types/unist": "^2.0.0",
"@types/nlcst": "^1.0.0",
"nlcst-to-string": "^3.0.0"

@@ -41,4 +41,4 @@ },

"prettier": "^2.0.0",
"remark-cli": "^9.0.0",
"remark-preset-wooorm": "^8.0.0",
"remark-cli": "^10.0.0",
"remark-preset-wooorm": "^9.0.0",
"rimraf": "^3.0.0",

@@ -48,3 +48,3 @@ "tape": "^5.0.0",

"typescript": "^4.0.0",
"xo": "^0.39.0"
"xo": "^0.44.0"
},

@@ -68,7 +68,3 @@ "scripts": {

"xo": {
"prettier": true,
"rules": {
"no-var": "off",
"prefer-arrow-callback": "off"
}
"prettier": true
},

@@ -75,0 +71,0 @@ "remarkConfig": {

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