JSPM

  • Created
  • Published
  • Downloads 6198
  • Score
    100M100P100Q137758F
  • License MIT

Strips leading and trailing white-space from a string, replaces sequences of whitespace characters by a single space, and returns the resulting string.

Package Exports

  • normalize-space-x

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (normalize-space-x) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

normalize-space-x

Travis status Dependency status devDependency status npm version

Strips leading and trailing white-space from a string, replaces sequences of whitespace characters by a single space, and returns the resulting string.

Requires ES3 or above.

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

module.exports(string)string

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.

Kind: Exported function
Returns: string - The normalized string.

Param Type Description
string String The string to be normalized.

Example

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

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