Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More โ†’
Socket
Sign inDemoInstall
Socket

properties-file

Package Overview
Dependencies
Maintainers
1
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

properties-file - npm Package Compare versions

Comparing version 3.1.0 to 3.1.1

2

lib/properties.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with โšก๏ธ by Socket Inc