1.0.0 • Published 7 years ago
s11n v1.0.0
s11n
Serialization types and validation functions.
Build & Test
npm run build
npm testLaunching the build NPM script will invoke the Typescript compiler and output
the compiled source, as well as declaration files, to a folder named build/.
Usage
The s11n library exposes a collection of functions used to determine whether
values are serializable.
import * as s11n from "s11n";
const my_arr = [ "Hello", 42, { x: 4, y: 2 } ];
if (s11n.isSerializableArray(my_arr)) {
// Yay! `JSON.parse(JSON.stringify(my_arr))` will yield a new object that is
// identical to `my_arr`, because all elements of `my_arr` are serializable.
}License
See the LICENSE file for license information.
1.0.0
7 years ago