jsserializer

0.0.2-alpha.2 • Public • Published

JS Serializer

NPM version Build Status Coverage Status

A library that can serialize or deserialize objects using an adapter.

Example

// import an adapter
import yaml from 'jsserializer-yaml';
// import this library
import serializer from 'jsserializer';
// load in the adapter
let service = serializer(yaml);
 
// provide the serializer options
let options = {};
 
// serialize
let obj = service.parse('test: 123', options);
let str = service.stringify(obj, options);

Install

NPM

  • Install: npm install --save jsserializer
  • Use: require('jsserializer')

JsSerializerAdapter API

parse(source: String, options: Object): Object
 
stringify(source: Object, options: String): String
 
parseAsync(source: String, options: Object): Thenable<Object>
 
stringifyAsync(source: Object, options: String): Thenable<String>
 
parseFile(filename: String, source: String, options: Object): Object
 
stringifyToFile(filename: String, source: Object, options: String): String

JsSerializer API

Implemeted by all serializers.

get extensions(): String
 
parse(source: String, options: Object): Object
 
stringify(source: Object, options: String): String

License

Copyright (c) 2016 https://github.com/orgs/jsserializers/people. All rights reserved.

Licensed under the MIT License. See LICENSE in the project root for license information.

Readme

Keywords

none

Package Sidebar

Install

npm i jsserializer

Weekly Downloads

7

Version

0.0.2-alpha.2

License

none

Last publish

Collaborators

  • pflannery