source: node_modules/space-separated-tokens/index.js

main
Last change on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 325 bytes
Line 
1'use strict'
2
3exports.parse = parse
4exports.stringify = stringify
5
6var empty = ''
7var space = ' '
8var whiteSpace = /[ \t\n\r\f]+/g
9
10function parse(value) {
11 var input = String(value || empty).trim()
12 return input === empty ? [] : input.split(whiteSpace)
13}
14
15function stringify(values) {
16 return values.join(space).trim()
17}
Note: See TracBrowser for help on using the repository browser.