Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bimedia-fr/node-sigma-message
simple key-value message parser and formater
https://github.com/bimedia-fr/node-sigma-message
Last synced: 8 days ago
JSON representation
simple key-value message parser and formater
- Host: GitHub
- URL: https://github.com/bimedia-fr/node-sigma-message
- Owner: bimedia-fr
- License: apache-2.0
- Created: 2014-03-01T21:24:23.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-06-30T13:44:22.000Z (over 10 years ago)
- Last Synced: 2024-04-25T06:01:54.674Z (8 months ago)
- Language: JavaScript
- Size: 156 KB
- Stars: 1
- Watchers: 10
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
node-sigma-message
==================simple key-value message parser and formater
introduction
------------
Format and parses string containing key-value pairs.synopsis
--------```javascript
var parser = require('sigma-message')();var obj = parser.parse('key=value;other=val');
console.log(obj);
// outputs {key:value,other:val}
```installation
------------$ npm install sigma-message
API
===parser(config)
----------------
The constructor function creates a new `parser`. Optionnal parameter `options` allow to change separator and delimiter.
`config` :* `delimiter` : default is ';'
* `separator` : default is '='.parse(string)
------------------------------------
Parse a string and return an objet containing key and values..format(obj)
------------------------------------
Returns a string containing parameters properties and values.