string-serializer
A JavaScript utility for parsing and stringifying values
Installation
npm install string-serializer
The CDN build is also available on unpkg:
- unpkg.com/string-serializer/dist/string-serializer.umd.js
- unpkg.com/string-serializer/dist/string-serializer.umd.min.js
API
parseArray()
parseObject()
parseBoolean()
parseInt()
: An alias forNumber.parseInt()
parseFloat()
: An alias forNumber.parseFloat()
stringifyArray()
stringifyObject()
Usage
; ; // [1, 2, 3]; // [1, 2, 3]; // ["1", "2", "3"] ; // ["a", "b", "c"]; // ["a", "b", "c"]; // ["a", "b", "c"] ; // { a: 1 }; // { a: 1 }
License
MIT © Qingrong Ke