sigma-message

simple key-value message parser and formater

node-sigma-message

simple key-value message parser and formater

Format and parses string containing key-value pairs.

var parser = require('sigma-message')();
 
var obj = parse('key=value;other=val');
console.log(obj);
// outputs {key:value,other:val} 
$ npm install sigma-message

API

The constructor function creates a new parser. Optionnal parameter options allow to change separator and delimiter. config :

  • delimiter : default is ';'
  • separator : default is '='

Parse a string and return an objet containing key and values.

Returns a string containing parameters properties and values.