文件名称:object-filler:异步填充对象属性
文件大小:4KB
文件格式:ZIP
更新时间:2024-06-22 10:21:51
JavaScript
对象填充 用异步函数填充对象的值 例如 var fill = require ( "object-filler" ) ; var populateMe = { payments : function ( cb ) { // do something async setTimeout ( function ( ) { // err = undefined, data = [{...}] return cb ( undefined , [ { amount : 10 , id : 19274 } ] ) ; } , 2000 ) ; } , // properties can be nested as much as you like at
【文件预览】:
object-filler-master
----LICENSE(1KB)
----test()
--------test.js(3KB)
----README.md(1KB)
----.gitignore(526B)
----index.js(2KB)
----package.json(746B)