{"name":"java-properties","description":"Reads and interpolates Java .properties files","version":"1.0.0","homepage":"http://github.com/mattdsteele/java-properties","author":{"name":"Matt Steele","email":"orphum@gmail.com"},"repository":{"type":"git","url":"git+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"}],"@pika/pack":{"pipeline":[["@pika/plugin-standard-pkg",{"exclude":["test/*"]}],["@pika/plugin-build-node"],["@pika/plugin-build-types",{"exclude":["test/*"]}]]},"engines":{"node":">= 0.6.0"},"scripts":{"test":"TS_NODE_PROJECT=\"tsconfig.test.json\" mocha --require ts-node/register \"test/**/*.ts\"","build":"pack build"},"devDependencies":{"@pika/pack":"^0.3.4","@pika/plugin-build-node":"^0.3.13","@pika/plugin-build-types":"^0.3.13","@pika/plugin-standard-pkg":"^0.3.13","@pika/plugin-ts-standard-pkg":"^0.3.13","@types/chai":"^4.1.7","@types/mocha":"^5.2.6","@types/node":"^11.10.4","chai":"^4.2.0","mocha":"^6.1.4","ts-node":"^8.0.2","typescript":"^3.3.3333"},"keywords":["java","properties"],"gitHead":"1901fa8ce8b8efe97351f124c9dde89e3f3132fc","_id":"java-properties@1.0.0","_nodeVersion":"12.0.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-sih2lxXiGR6FFeuvUfsoBw/Tcdj4DVulHT+4yeB+RNF04K2RC2up/tgZiu4YcXG+ioP4mh95g/hysY9sVgdZCQ==","shasum":"f792fc99665d28827592315818f446fd13c56027","tarball":"http://registry-npm.ywwl.com/java-properties/download/java-properties-1.0.0.tgz","fileCount":23,"unpackedSize":38225,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc1MbPCRA9TVsSAnZWagAAuMoP/3qQvQ8uyCWh4aZK4eUj\n9n9LhRFkafnK/4QvL1N4W7ry9z8I7Rt1chGI3OBrXD6bmLn8nxEJ9FkIRsFl\nM9Z9NI5LjwfXVQsNkJ0N9RmYTVpI3bX0QZpsSJTCmu+fjRu80Jzq7qn70ArT\nxfVza3r5aASR45F/V0F7x7bQDXrsay7qwA7KXpHOwTb0DwG42N4zuJbIkRcR\nHMLDNRF80hse170WNfHsJ0wL9uy9TEDC4FowFe/iJnxe4Ybzqc80oiJp/Pcr\nJbXuikRK9Z471cRSK4zHBdwpEEv4Q47Cz6AcgEatSiKVj0WyzLcJf0gHdMDh\nMBGscXNeAbR3b6n7FH6dy11Fzg0P1PfBOwRYVGUYvf65t24byq8KHTLUyZJE\n5euw1SxS4TMIVijeiO2bRR1LGELLylMlttLhqmEel/MRtwETQ0Y1KCb2PqaN\nlMjOenmDqHk9iU7Yiin58a6RR7Qo9++2/SLMVek5D3p6TJU1UXbAiz+ueuWK\nKy9rXpPWw5E6EbIXbiHj5z5prr+X5rctxq6VA8HS/sCEKU8XvIBu8ysQ/N5F\nHJNPvgUkwXlv4lkMaZasSPdK51Hurzq/l63v6TsWFvJ6ceAq7KR3ao11M60x\n3gyXegJylucq+PyL3U6HzsG/E5iIMuLLUT3hPRShZ8B7/bYx02f89uHJ/Izz\nbtZ2\r\n=sI+X\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEi5nHD4Xecz/dPSRO6yG6jUvAUyF1i587mmKiz0iOF+AiA+qTPgRk40KI/y4/4OKq1xP5miZ6nPBwqBgSVIzU4GgQ=="}],"size":9366,"noattachment":false,"key":"/java-properties/-/java-properties-1.0.0.tgz"},"maintainers":[{"name":"mattdsteele","email":"orphum@gmail.com"}],"_npmUser":{"name":"mattdsteele","email":"orphum@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/java-properties_1.0.0_1557448397749_0.09442936955496384"},"_hasShrinkwrap":false,"deprecated":"Improperly published, use v1.0.1 or later","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":1557448397886,"_cnpm_publish_time":1557448397886,"dist-tags":{"latest":"1.0.2"}}