【文件属性】:
文件名称:PersistableObject:一个可以轻松持久保存的JS对象
文件大小:5KB
文件格式:ZIP
更新时间:2021-05-19 16:25:49
JavaScript
持久对象
一个可以轻松持久的JS对象。
安装:
PersistableObject可通过npm获得
npm install persistable-object
用法:
PersistableObject为您提供可以持久化的对象。
例子:
var persistableObject = require('persistable-object');
// load yourpo.json
var po = persistableObject("yourpo.json");
// use po as any other object.
po.hello = "world";
po.obj = {a:{b:1},c:{d:{e:5}}};
po.int = 5;
//persists the object to yourpo.json
po.save();
【文件预览】:
PersistableObject-master
----app.js(420B)
----.travis.yml(131B)
----LICENSE(1KB)
----test()
--------test.js(6KB)
----README.md(821B)
----.gitignore(526B)
----package.json(723B)