Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Parses string options in a format similar to CSS.
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
.gitignore
.travis.yml
Gruntfile.coffee
MIT-LICENSE
README.md
karma.conf.coffee
package.json

README.md

syntaxhighlighter/opts-parser

Parses key/value pairs into hash object.

Build Status

Installation

npm install syntaxhighlighter/opts-parser

Usage Example

var opts = require('opts-parser');

opts.parse("hello: value; foo-bar: [12, "monkeys"]; value: 'value'")

{
  "hello": "value",
  "foo-bar": [12, "monkeys"],
  "fooBar": [12, "monkeys"],
  "value": "value
}

Understands the following formats:

  • name: true|false;
  • name: word;
  • name: [word, word];
  • name: "string";
  • name: 'string';

Testing

npm test

License

MIT

Something went wrong with that request. Please try again.