activestack-gateway
Version:
Socket server for ActiveStack
35 lines (34 loc) • 2.64 kB
JSON
{
"name": "node-properties-parser",
"version": "0.0.2",
"description": "A parser for .properties files written in javascript",
"keywords": [
"parser",
".properties",
"java",
"file parser"
],
"maintainers": [
{
"name": "Xavi",
"email": "xavi.rmz@gmail.com",
"url": "http://xavi.co"
}
],
"main": "./index.js",
"repository": {
"type": "git",
"url": "git+https://github.com/Xavi-/node-properties-parser.git"
},
"engines": {
"node": ">= 0.3.1"
},
"readme": "# node-properties-parser\n\nA parser for [.properties](http://en.wikipedia.org/wiki/.properties) files written in javascript. Properties files store key-value pairs. They are typically used for configuration and internationalization in Java applications. Here's an example of the format:\n\n\t# You are reading the \".properties\" entry.\n\t! The exclamation mark can also mark text as comments.\n\twebsite = http://en.wikipedia.org/\n\tlanguage = English\n\t# The backslash below tells the application to continue reading\n\t# the value onto the next line.\n\tmessage = Welcome to \\\n\t Wikipedia!\n\t# Add spaces to the key\n\tkey\\ with\\ spaces = This is the value that could be looked up with the key \"key with spaces\".\n\t# Unicode\n\ttab : \\u0009\n*(taken from [Wikipedia](http://en.wikipedia.org/wiki/.properties#Format))*\n\nCurrently works with any version of node.js.\n\n## The API\n\n- `parse(text)`: Parses `text` into key-value pairs. Returns an object containing the key-value pairs.\n- `read(path, callback)`: Opens the file specified by `path` and calls `parse` on its content. The result is then passed to `callback` as the second parameter. If an error occurs, the error object is passed to `callback` as the first paramter.\n- `readSync(path)`: A synchronous version of `read`. Opens the file specified by `path` synchronously and calls `parse` on its contents.\n\n## Getting node-properties-parser\n\nThe easiest way to get node-properties-parser is with [npm](http://npmjs.org/):\n\n\tnpm install node-properties-parser\n\nAlternatively you can clone this git repository:\n\n\tgit://github.com/xavi-/node-properties-parser.git\n\n## Developed by\n* Xavi Ramirez\n\n## License\nThis project is released under [The MIT License](http://www.opensource.org/licenses/mit-license.php).",
"readmeFilename": "README.markdown",
"bugs": {
"url": "https://github.com/Xavi-/node-properties-parser/issues"
},
"homepage": "https://github.com/Xavi-/node-properties-parser#readme",
"_id": "node-properties-parser@0.0.2",
"_from": "node-properties-parser@^0.0.2"
}