Mohammad Asif cf937194cb Removed un-waned things 1. | 5 månader sedan | |
---|---|---|
.. | ||
index.js | 5 månader sedan | |
license | 5 månader sedan | |
package.json | 5 månader sedan | |
readme.md | 5 månader sedan |
Parse and stringify space-separated tokens according to the spec.
npm:
npm install space-separated-tokens
var spaceSeparated = require('space-separated-tokens')
spaceSeparated.parse(' foo\tbar\nbaz ')
//=> ['foo', 'bar', 'baz']
spaceSeparated.stringify(['foo', 'bar', 'baz'])
//=> 'foo bar baz'
spaceSeparated.parse(value)
Parse space-separated tokens to an array of strings, according to the spec.
value
(string
) — space-separated tokensArray.<string>
— List of tokens.
spaceSeparated.stringify(values)
Serialize an array of strings to space-separated tokens. Note that it’s not possible to specify empty or whitespace only values.
values
(Array.<string>
) — List of tokensstring
— Space-separated tokens.
collapse-white-space
— Replace multiple white-space characters with a single spaceproperty-information
— Information on HTML propertiescomma-separated-tokens
— Parse/stringify comma-separated tokens