npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

fz-property-file-reader

v2.0.1

Published

for access property file

Downloads

397

Readme

Fz Property File Reader

This library using for access property file. You can read, write property file by using it.

Installation

You can install the fz-property-file-reader from npm by running.

npm install --save fz-property-file-reader

Usage

var propertyReader = require('fz-property-file-reader');

`Params -  property file's absolute path`

`Params type - key : string`

`Return - instance object`

`Return type - object`

var prop = propertyReader('sample.properties'); // for example

Methods

Get

Params - key

Params type - key : string

Return - value of your key

// Usage

prop.get(key);

If you pass the key to this method, it will returns the value to that key.

Set

Params - key, value

Params type - key : string, value : anything

Return - null

// Usage

prop.set(key, value);

Pass the key and value to this method, it will add your value with the key to properties file.

If your key already exists, it will throw key already exists error. At the time you will use update method instead of set. Because, you should not forget and change the existing keys.

Update

Params - key, value

Params type - key : string, value : anything

Return - null

// Usage

prop.update(key, value);

Pass the key and value to this method, it will update your value with the key to properties file.

If your key doesn't exists, it will throw key doesn't exists error. At the time you will use set method instead of update.

Has

Params - key

Params type - string

Return - ture or false

Return type - boolean

// Usage

prop.has(key);

Pass the key to this method, it will returns you key is there or not.

Remove

Params - key

Params type - string

Return - none

Return type - none

// Usage

prop.remove(key);

Pass the key to this method, it will remove value of key to your properties file. If there is no key, it will throws the key doesn't exists error.

GetAll

Params - none

Params type - none

Return - properties file as object

Return type - object

// Usage

prop.getAll();

Just call this method, it will returns object of your properties file.

GetKeys

Params - none

Params type - none

Return - keys of your properties file

Return type - array

// Usage

prop.getKeys();

Just call this method, it will returns array that has your properties file's keys.

Push

Params - none

Params type - none

Return - nothing

Return type - none

// Usage

prop.push();

Push method used to push your changes to your properties file. Just call this method, it will push your changes to your properties file.

GetRaw

Params - none

Params type - none

Return - raw data of your properties file

Return type - string

// Usage

prop.getRaw();

Just call this method, it will returns your properties file without parse.

Conclusion

If you find any errors in this, please let me know about it by using raise issue.