derived-property:创建对象的派生属性

时间:2021-05-21 19:44:28
【文件属性】:
文件名称:derived-property:创建对象的派生属性
文件大小:7KB
文件格式:ZIP
更新时间:2021-05-21 19:44:28
JavaScript 派生财产 创建对象的派生属性 安装 用安装 $ npm install derived-property --save 用法 var derivedProperty = require ( 'derived-property' ) ; var obj = { first : 'Gilad' , last : 'Peleg' } var displayName = derivedProperty ( { dependencies : [ 'first' , 'last' ] , getter : function ( first , last ) { return first + ' ' + last ; } } ) ; // apply the derived property Object . defineProperty ( obj , 'display
【文件预览】:
derived-property-master
----.jshintrc(313B)
----.gitignore(51B)
----package.json(871B)
----.travis.yml(941B)
----LICENSE(1KB)
----index.js(3KB)
----test.js(10KB)
----README.md(2KB)
----.gitattributes(12B)
----.editorconfig(174B)

网友评论