properties-file
Advanced tools
Comparing version 3.1.0 to 3.1.1
@@ -67,3 +67,3 @@ "use strict"; | ||
this.keyLineNumbers = {}; | ||
var stringContent = Buffer.isBuffer(content) ? content.toString() : content; | ||
var stringContent = typeof content === 'string' ? content : content.toString(); | ||
this.hasBom = stringContent.codePointAt(0) === exports.BOM_CODE_POINT; | ||
@@ -70,0 +70,0 @@ this.eolCharacter = (_a = (0, exports.getFirstEolCharacter)(stringContent)) !== null && _a !== void 0 ? _a : exports.DEFAULT_END_OF_LINE_CHARACTER; |
{ | ||
"name": "properties-file", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"description": ".properties file parser, editor, formatter and Webpack loader.", | ||
@@ -86,3 +86,3 @@ "keywords": [ | ||
"prettier-plugin-sh": "0.12.8", | ||
"release-it": "15.10.1", | ||
"release-it": "15.10.2", | ||
"ts-jest": "29.1.0", | ||
@@ -89,0 +89,0 @@ "ts-node": "10.9.1", |
@@ -171,2 +171,5 @@ # properties-file | ||
properties.delete('hello') | ||
properties.update('world', { | ||
newValue: 'new world', | ||
}) | ||
console.log(properties.format()) | ||
@@ -178,3 +181,3 @@ | ||
* # This is a comment | ||
* world = world | ||
* world = new world | ||
* ! Below are the new keys being edited | ||
@@ -189,3 +192,3 @@ * newKey1 = This is my first new key | ||
We were not able to show all methods in the example, but the `update` and `upsert` methods can also be useful to modify content. | ||
For convenience, we also added an `upsert` method that allows updating a key if it exists or adding it at the end, when it doesn't. Make sure to check in your IDE for all available methods and options in our TSDoc. | ||
@@ -192,0 +195,0 @@ ### Webpack File Loader |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
69603
283