Files
2023-08-01 13:49:46 +02:00
..
2023-08-01 13:49:46 +02:00
2023-08-01 13:49:46 +02:00
2023-08-01 13:49:46 +02:00
2023-08-01 13:49:46 +02:00
2023-08-01 13:49:46 +02:00
2023-08-01 13:49:46 +02:00
2023-08-01 13:49:46 +02:00
2023-08-01 13:49:46 +02:00
2023-08-01 13:49:46 +02:00
2023-08-01 13:49:46 +02:00
2023-08-01 13:49:46 +02:00

Travis status Dependency status devDependency status npm version

normalize-space-x

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

Version: 3.0.0
Author: Xotic750 Xotic750@gmail.com
License: MIT
Copyright: Xotic750

normalize-space-x.normalizeSpace

Reference to normalizeSpace2018.

Kind: static property of normalize-space-x

normalize-space-x.normalizeSpace2016string

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. (ES2016)

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

var normalizeSpace = require('normalize-space-x');

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

normalize-space-x.normalizeSpace2018string

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. (ES2018)

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

var normalizeSpace = require('normalize-space-x');

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