node-strong
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

SHIMMER NODE STRONG

A Strong for node server-side object

INSTALL

npm install node-strong

HOW TO USE FOR js AND ts

it can use for save and read some config or data

data will save as a json file

simple use

const strong = require("node-strongjs")
 
//set
strong.set("welcome", "test-data")
//get
console.log(strong.get("welcome"))
// output "test-data"

custom

you can use the function strong.install() to set some custom config , and it must be run befor any other function

  • object is a default object to init the strong
  • path require a string of file path , it will make the file save use your path
  • watch require a function , if it not null , it will watch the change for the file , and if happend will call your function but in this version , we don't recommend you use it for the object need often run set function

example

const strong = require("node-strongjs")
const path = require("path")
 
strong.install({"hello":"init"},path.join(__dirname,'./data.json'),null)
 
strong.get("hello")

Readme

Keywords

Package Sidebar

Install

npm i node-strong

Weekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

6.29 kB

Total Files

4

Last publish

Collaborators

  • fenyu