normalize-space-x
Strips leading and trailing white-space from a string, replaces sequences of whitespace characters by a single space, and returns the resulting string.
Last updated 8 years ago by xotic750 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install normalize-space-x 
SYNC missed versions from official npm registry.

Travis status Dependency status devDependency status npm version jsDelivr hits bettercodehub score Coverage Status

Coverage Status

normalize-space-x

Trims and replaces sequences of whitespace characters by a single space.

module.exports(string)string

normalize-space-xstring

This method strips leading and trailing white-space from a string, replaces sequences of whitespace characters by a single space, and returns the resulting string. (ES2019)

Kind: static property of normalize-space-x
Returns: string - The normalized string.
Throws:

  • TypeError If string is null or undefined or not coercible.
Param Type Description
string string The string to be normalized.

Example

import normalizeSpace from 'normalize-space-x';

console.log(normalizeSpace(' \t\na \t\nb \t\n') === 'a b'); // true

Current Tags

  • 4.1.2                                ...           latest (5 years ago)

42 Versions

  • 4.1.2                                ...           5 years ago
  • 4.1.1                                ...           5 years ago
  • 4.1.0                                ...           5 years ago
  • 4.0.38                                ...           5 years ago
  • 4.0.37                                ...           5 years ago
  • 4.0.36                                ...           5 years ago
  • 4.0.35                                ...           5 years ago
  • 4.0.34                                ...           5 years ago
  • 4.0.33                                ...           5 years ago
  • 4.0.32                                ...           5 years ago
  • 4.0.31                                ...           5 years ago
  • 4.0.29                                ...           5 years ago
  • 4.0.28                                ...           5 years ago
  • 4.0.27                                ...           5 years ago
  • 4.0.26                                ...           5 years ago
  • 4.0.25                                ...           5 years ago
  • 4.0.24                                ...           5 years ago
  • 4.0.23                                ...           5 years ago
  • 4.0.22                                ...           5 years ago
  • 4.0.21                                ...           5 years ago
  • 4.0.20                                ...           5 years ago
  • 4.0.19                                ...           5 years ago
  • 4.0.18                                ...           5 years ago
  • 4.0.17                                ...           5 years ago
  • 4.0.16                                ...           5 years ago
  • 4.0.15                                ...           5 years ago
  • 4.0.14                                ...           5 years ago
  • 4.0.13                                ...           5 years ago
  • 4.0.12                                ...           5 years ago
  • 4.0.1                                ...           5 years ago
  • 4.0.0                                ...           5 years ago
  • 3.0.0                                ...           7 years ago
  • 2.0.0                                ...           7 years ago
  • 1.3.4                                ...           7 years ago
  • 1.3.3                                ...           7 years ago
  • 1.3.2                                ...           7 years ago
  • 1.3.1                                ...           7 years ago
  • 1.3.0                                ...           7 years ago
  • 1.2.0                                ...           8 years ago
  • 1.1.1                                ...           8 years ago
  • 1.1.0                                ...           8 years ago
  • 1.0.0                                ...           8 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (16)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE