You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

properties-reader

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

properties-reader

Properties file reader for Node.js

2.3.0
latest
Source
npm
Version published
Weekly downloads
949K
-19.67%
Maintainers
1
Weekly downloads
 
Created

What is properties-reader?

The properties-reader npm package is a utility for reading and manipulating .properties files in Node.js. It allows you to load properties files, access and modify their values, and save changes back to the file.

What are properties-reader's main functionalities?

Load Properties File

This feature allows you to load a .properties file into a PropertiesReader object, making it easy to access and manipulate the properties within the file.

const PropertiesReader = require('properties-reader');
const properties = PropertiesReader('path/to/file.properties');

Get Property Value

This feature allows you to retrieve the value of a specific property key from the loaded properties file.

const value = properties.get('some.property.key');
console.log(value);

Set Property Value

This feature allows you to set or update the value of a specific property key in the loaded properties file.

properties.set('some.property.key', 'new value');

Save Properties File

This feature allows you to save the changes made to the properties back to the file.

properties.save('path/to/file.properties');

Get All Properties

This feature allows you to retrieve all properties as an object, making it easy to work with all the properties at once.

const allProperties = properties.getAllProperties();
console.log(allProperties);

Other packages similar to properties-reader

Keywords

properties

FAQs

Package last updated on 23 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts