Alinex Format: Readme
This package will give you an easy way to serialize and deserialize different data objects into multiple formats.
The major features are:
- easy to use
- load format libraries on demand
- auto detection
Read the complete documentation under https://alinex.github.io/node-format.
The easiest way is to let npm add the module directly to your modules (from within you node modules directory):
npm install alinex-format --save
And update it to the latest version later:
npm update alinex-format --save
Always have a look at the latest changes.
To use the format you have to load the module first:
format = require 'alinex-format'
This gives you back the main format instance which holds two methods to use:
Serialize data object into string.
objobject to be formatted
formatformat to use or filename to read format from
options(optional) specific for the format
cbcallback will be called with (err, text)
Try to parse object from string. Auto detect if no format is given.
stringtext to be parsed
format(optional) format to use or filename to read format from
cbcallback will be called with (err, object)
(C) Copyright 2016 Alexander Schilling
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.