{"name":"java-properties","description":"Reads and interpolates Java .properties files","version":"1.0.1","license":"MIT","esnext":"dist-src/index.js","main":"dist-node/index.js","types":"dist-types/index.d.ts","pika":true,"sideEffects":false,"keywords":["java","properties"],"homepage":"http://github.com/mattdsteele/java-properties","bugs":{"url":"https://github.com/mattdsteele/java-properties/issues"},"repository":{"type":"git","url":"git+https://github.com/mattdsteele/java-properties.git"},"dependencies":{},"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"},"engines":{"node":">= 0.6.0"},"_id":"java-properties@1.0.1","_nodeVersion":"12.0.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-HbTaaXlIHoDVNXjmp4flOBWOfYBkrVN8dD1tp4m+95M/ADSDW/BxWbiwyVIhw/2+5d0cof4PHZCbE7+S1ukTQw==","shasum":"ea0b5986c0894d73cf2a44de8bd216c459a07a94","tarball":"http://registry-npm.ywwl.com/java-properties/download/java-properties-1.0.1.tgz","fileCount":5,"unpackedSize":14197,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc1McjCRA9TVsSAnZWagAAZnEQAJEL5G2aQxtbg7hkKMOH\n/XdHvr2nS6QTF1uNd8F78Ls2bIm6Ao7z4VD236DZ5hBVU40IClpUPzo1ZmrQ\n2khE4YBUCw9WlzpZlfKr6zOGvj46MXZPkOIwOKqhlFJuLxpYss9340SxL0hh\nn0QC3CGK8MOGSYnzrDlUyDTLE/TeCivjuyshLhAf/qwSmph9XrBKl0wBA5xx\n36bS5tUnBdvCvtljrLr7Bc6BRsWhI2z9zVoewTLykKkJoUDn+ZG6ajBm9Zl9\nhxEWI21q7go1Rl+DtoAXk627war834SB5hTatSsd2VaAnpOnK9W2qNoT4JJC\ni5K0ScXNpFMFL3QQHNkb5GRCDoytReRF3WVBZjke5wsPxpqmg4Nl7GkDB2cS\n+do4ywGc8cFq0RTRlVsfQJg+KNxpskCplGFlK2PmNJOIG/6RWpIB13r4CQI1\njmB3z0YLD7EuZdS7meuzpRyVHvuqYkcyMhEYjVFU7K75KZnhzjZvBwHP5/be\nARjC0ToyLZRrxEAqp1GbhJ5t+TewGTpcLQFGXCokErrAStn+kKF+f23WgpDt\nBFy0NiHgVLH5koqTJSrHBeeQoCXaHMykII+TrYC5vUbmwyn1x+q7IttckaSm\noM8GCDE+1ZllQjMfk4719+B+BXOeibcZ4PTttfjqJ1Oe5BI02adFC61K2E6F\npHNS\r\n=Eyyv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGuNL/CjXKRcsulUV4Phc38qYEtI0v8I6nmWmx8eVI9WAiEAuidJnneVKep3+QEhGEry1z70/vfToYj0EgaPAca1A/E="}],"size":3439,"noattachment":false,"key":"/java-properties/-/java-properties-1.0.1.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.1_1557448483103_0.8194789814617651"},"_hasShrinkwrap":false,"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":1557448483213,"_cnpm_publish_time":1557448483213,"dist-tags":{"latest":"1.0.2"}}