nropf

0.0.4 • Public • Published

nropf

node Read-Only property file

nropf is a simple way to use properties file. It allow user to add comments inside the properties file, which could not be achieved whitin a standard json file. There is also a cache mecanism. Once a file is used, it won't be read again event if mutiple modules required the same properties file, which is nice to centralize the conf of the app

File format

The simplest way to use it is a key value pair separated by '='

key=value

You could also use comment inside the file

 # this is a comment

If the line start with white space, it will be ignored

  key2=value2
  #comment

White lines will simplify be ignored

Usage

var properties = require("nropf").use("myfile")
properties.key

NPM

This package can be found on NPM https://npmjs.org/package/nropf

Package Sidebar

Install

npm i nropf

Weekly Downloads

1

Version

0.0.4

License

BSD

Last publish

Collaborators

  • benzen