🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

ascii-whitespace

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ascii-whitespace

A regular expression for ASCII/HTML whitespace, as defined by W3C and WHATWG.

1.0.0
latest
Source
npm
Version published
Weekly downloads
5
-37.5%
Maintainers
1
Weekly downloads
 
Created
Source

ascii-whitespace

A Node.js module containing a regular expression for ASCII/HTML whitespace, as defined by W3C and WHATWG.

ASCII whitespace means any combination of U+0009, U+000A, U+000C, U+000D, or U+0020.

Installation

npm install ascii-whitespace --save

Usage

const asciiWhitespace = require('ascii-whitespace')()

asciiWhitespace instanceof RegExp // true
asciiWhitespace.test(' ') // true

Spec References

W3C’s definition, from the HTML5 specification (retrieved 2017-03-07):

The space characters, for the purposes of this specification, are U+0020 SPACE, "tab" (U+0009), "LF" (U+000A), "FF" (U+000C), and "CR" (U+000D).

WHATWG's definition (retrieved 2017-03-07):

An ASCII whitespace is U+0009, U+000A, U+000C, U+000D, or U+0020.

Keywords

whitespace

FAQs

Package last updated on 07 Mar 2017

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