readonly:节点对象中自定义模块之间的简单引用限制库

时间:2024-07-03 18:26:28
【文件属性】:

文件名称:readonly:节点对象中自定义模块之间的简单引用限制库

文件大小:5KB

文件格式:ZIP

更新时间:2024-07-03 18:26:28

JavaScript

只读 readonly是节点对象中自定义模块之间的简单引用限制库。 如何安装 npm install readonly 如何使用 var readonly = require ( 'readonly' ) ; var obj = { 'A' : 'a' , 'B' : 'b' , 'C' : 'c' } ; // Normal ACL. You can use `obj` through moduleA as you like var moduleA = { } ; moduleA . obj = obj ; // Readonly restriction of `obj` in moduleB var moduleB = { } ; moduleB . obj = readonly ( obj ) ; // You can update `obj` from moduleA mod


【文件预览】:
readonly-master
----lib()
--------readonly.js(703B)
--------UnableRewriteException.js(239B)
--------index.js(199B)
----.npmignore(13B)
----.travis.yml(110B)
----LICENSE(1KB)
----test()
--------readonly-test.js(3KB)
----README.md(937B)
----.gitignore(97B)
----package.json(577B)

网友评论