{"name":"java-properties","description":"Reads and interpolates Java .properties files","version":"1.0.0-0","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.0.2","ts-node":"^8.0.2","typescript":"^3.3.3333"},"engines":{"node":">= 0.6.0"},"_id":"java-properties@1.0.0-0","_nodeVersion":"10.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-Z0S3xCg847mgWYxXTKwy41q4cb7LOoj1hRF2JZmc4sB2fkESwT0B16Y39EoGu0SaLHuRXqa/06RCGLa8K3n4jw==","shasum":"5c0d4a8ce6fd0325d8a8914f7be9eb6aaed04ddc","tarball":"http://registry-npm.ywwl.com/java-properties/download/java-properties-1.0.0-0.tgz","fileCount":5,"unpackedSize":14018,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcfgHrCRA9TVsSAnZWagAAOT0P+QHikVbA3aFF+60Pt1iK\nH0GWYHCXT5D+IcQLnA6Sc17xECV6EGWmAzFqoLG8dRpW1GM78UJlSmop37xf\nLh+2TH0+2iuECf+VEwIwjt/u+JTU2GKdpDPuZxFnZjSVUZCoidcEkS4X3XHL\nGAX3ePF0nKYwc9NCQz19truolDQiRjvlydJN6N9RKu/RxEe/EQFGpcBu14CT\nT7ueoHVHn2deswSbxpBwnVSJaGxHB+pMakxGZwBWcfsBIcULfV0eG7JL8K8y\n6R+9K52uHHiGtzoWn4fE08rEI1yPRn0k659Qn85snBla3GuAr0QjKorg5SA1\nq1AYEc/k9vrzXRgNE3FFGqOnfjenzCYxvpcOWLgBAhHZxT5v+HrKeQYURYM/\nV0d6BEIofOKTGvVK8enrqp6hdHyYbgc36GCTFlb+O1pUFMzg/K72OyLWZl/U\n+Al5vwOeUU/TdOxb3bZy/gmU0iLl3/gd33IrgEk4su//WUrfZHsotVByCnwR\nk471LYBZiqAA5yiWmmZnvdZVxB/Fab3pHkbVFoehfurcSzR20QE8UPWRKLhc\nM9E/wOyBinqpuI0/zA99Oz7ncSiXOmBrHOJd+AN03ySebB9KO7Xf+myEUeTl\nPYd7hjFgifTXjblHcRW3Z4Mg3gDyvifDfvWHSkseQH0kxFCDeP3mXtaSVKP1\n1taN\r\n=LeCk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCC5KMScqQ6G07zmDyyw+hEN3edCHQz4oKSI4Pi7VeWeQIgWFLpWTlAb0hcsgjpK6+RJEtSZopsJ9YjyY5CNysRPuM="}],"size":3402,"noattachment":false,"key":"/java-properties/-/java-properties-1.0.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-0_1551761898533_0.023622282799151906"},"_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":1551761898757,"_cnpm_publish_time":1551761898757,"dist-tags":{"latest":"1.0.2"}}