{"name":"java-properties","description":"Reads and interpolates Java .properties files","version":"0.2.2","homepage":"http://github.com/mattdsteele/java-properties","author":{"name":"Matt Steele","email":"orphum@gmail.com"},"repository":{"type":"git","url":"https://github.com/mattdsteele/java-properties.git"},"bugs":{"url":"https://github.com/mattdsteele/java-properties/issues"},"licenses":[{"type":"MIT","url":"http://opensource.org/licenses/MIT"}],"main":"lib/properties","engines":{"node":">= 0.6.0"},"scripts":{"test":"grunt nodeunit"},"devDependencies":{"grunt-contrib-jshint":"~0.1.1","grunt-contrib-nodeunit":"~0.1.2","grunt-contrib-watch":"~0.2.0","grunt":"~0.4.1"},"keywords":["java","properties"],"gitHead":"0e22c544cac7bcf50db53ef6ce582d1564f14ff1","_id":"java-properties@0.2.2","_shasum":"d377a6a97f97ad2a16589c9113c87f512e31f3bd","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"mattdsteele","email":"orphum@gmail.com"},"maintainers":[{"name":"mattdsteele","email":"orphum@gmail.com"}],"dist":{"shasum":"d377a6a97f97ad2a16589c9113c87f512e31f3bd","tarball":"http://registry-npm.ywwl.com/java-properties/download/java-properties-0.2.2.tgz","integrity":"sha512-QuJaFutjkNpW/NM1XFhcAGGSa8SBJxZZ/4QUyonCUSP/LUQ4cMu4/xmQqbYBTeErUIZtcY8p7yzLdFAeWN0+GA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICt5yPoiSTLK0Cji3s3Z4Kku6AVHjCcomajHz+owjjlvAiABipEwbjP7ByUxS+hnvHNAnYNRrisfBmTd4qJGNoXrTQ=="}],"size":5758,"noattachment":false,"key":"/java-properties/-/java-properties-0.2.2.tgz"},"directories":{},"readme":"# java-properties\r\n\r\n![travis](https://travis-ci.org/mattdsteele/java-properties.svg)\r\n\r\nRead Java .properties files. Supports adding dynamically some files and array key value (same key multiple times)\r\n\r\n## Getting Started\r\n\r\nInstall the module with: `npm install java-properties`\r\n\r\n## Documentation\r\n\r\n```javascript\r\n    var properties = require('java-properties');\r\n\r\n    // Reference a properties file\r\n    var values = properties.of('values.properties');\r\n\r\n    //Read a value from the properties file\r\n    values.get('a.key'); //returns value of a.key\r\n\r\n    //Add an additional file's properties\r\n    values.add('anotherfile.properties');\r\n\r\n    //Clear out all values\r\n    values.reset();\r\n    ...\r\n    // returns the value of a.key of 'defaultValue' if key is not found\r\n    values.get('a.key', 'defaultValue');\r\n    ...\r\n    // returns the value of the a.int.key as an int or 18\r\n    values.getInt('a.int.key', 18);\r\n    ...\r\n    // returns the value of the a.float.key as a float or 18.23\r\n    values.getFloat('a.float.key', 18.23);\r\n    ...\r\n    // returns the value of the a.bool.key as an boolean. Parse true or false with any case or 0 or 1\r\n    values.getBoolean('a.bool.key', true);\r\n    ...\r\n    // returns all the keys\r\n    values.getKeys();\r\n    ...\r\n    // adds another file the properties list\r\n    values.addFile('anotherFile.properties');\r\n    ...\r\n    // empty the keys previously loaded\r\n    values.reset();\r\n    ...\r\n    [ -- .properties file\r\n    an.array.key=value1\r\n    an.array.key=value2\r\n    ]\r\n    values.get('an.array.key'); // returns [value1, value2]\r\n\r\n    // Multiple contexts\r\n    var myFile = new PropertiesFile(\r\n        'example.properties',\r\n        'arrayExample.properties');\r\n    myFile.get('arrayKey');\r\n\r\n    var myOtherFile = new PropertiesFile();\r\n    myOtherFile.addFile('example.properties');\r\n    myOtherFile.addFile('example2.properties');\r\n```\r\n\r\n## Contributing\r\n\r\nIn lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.\r\n\r\n## Release History\r\n\r\n- 0.1.0 Initial commit\r\n- 0.1.5 Support empty strings\r\n- 0.1.6 New API: `getKeys`\r\n- 0.1.7 New APIs: `addFile` and `reset`\r\n- 0.1.8 Add array key (the same key many time in files)\r\n- 0.2.0 Wrap features into a class to be able to have multiple running contexts\r\n- 0.2.1 Add default value to get method. Add getInt and getFloat to get an integer or float value\r\n- 0.2.2 Add getBoolean method to get a value as a boolean. Accepted values are true, TRUE, false, FALSE, 0, 1\r\n- 0.2.3 Add getMatchingKeys method\r\n- 0.2.4 Allow multi-line properties\r\n- 0.2.5 Refactorings, no new features\r\n- 0.2.6 FIX interpolation when a property is multivalued\r\n- 0.2.7 Get only last value for int and boolean in case of multivalued attribute\r\n- 0.2.8 FIX unicode \\uxxxx char decoding\r\n- 0.2.9 Allow multiple double quotation marks\r\n- 0.2.10 fix bug with escaped : & = (thanks @Drapegnik)\r\n- 1.0.0 Rewrite as Typescript. Support Node 6+ only\r\n\r\n## License\r\n\r\nLicensed under the MIT license.\r\n","publish_time":1412638237634,"_cnpm_publish_time":1412638237634,"dist-tags":{"latest":"1.0.2"}}