bond:简单的CommonJS PromisesA(延迟)实现

时间:2021-03-07 23:37:38
【文件属性】:
文件名称:bond:简单的CommonJS PromisesA(延迟)实现
文件大小:7KB
文件格式:ZIP
更新时间:2021-03-07 23:37:38
JavaScript Bond-一个简单的CommonJS Promises实现 Bond是规范的简单实现。 它允许作者编写与promise兼容的方法。 反过来,这又允许用户添加多个功能以对原始调用的“成功”或“失败”进行调用。 例子 // This is a promise-compatible method that // waits for 10 milliseconds and then keep // or break the promise depending on the // 'pass' argument. var wait10millis = function(pass) { var dfd = bond.deferred(); setTimeout(function() { if ( pass ) { dfd.resolve();
【文件预览】:
bond-master
----index.js(162B)
----package.json(395B)
----Rakefile(53B)
----Gemfile(76B)
----src()
--------bond.js(3KB)
----Gemfile.lock(688B)
----spec()
--------javascripts()
----.gitignore(11B)
----README.md(2KB)

网友评论