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 |
|
---|
3 | exports.parse = parse
|
---|
4 | exports.stringify = stringify
|
---|
5 |
|
---|
6 | var empty = ''
|
---|
7 | var space = ' '
|
---|
8 | var whiteSpace = /[ \t\n\r\f]+/g
|
---|
9 |
|
---|
10 | function parse(value) {
|
---|
11 | var input = String(value || empty).trim()
|
---|
12 | return input === empty ? [] : input.split(whiteSpace)
|
---|
13 | }
|
---|
14 |
|
---|
15 | function stringify(values) {
|
---|
16 | return values.join(space).trim()
|
---|
17 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.