@promises/to-callback
Version:
To Callback is package from Promises library
28 lines (22 loc) • 818 B
JavaScript
/**
* @module @promises/to-callback
* @copyright © 2017 Yisrael Eliav <yisraelx@gmail.com> (https://github.com/yisraelx)
* @license MIT
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.P = global.P || {})));
}(this, (function (exports) { 'use strict';
function toCallback(value, callback) {
return Promise
.resolve(value)
.then(function (value) {
return callback(null, value);
}, callback);
}
exports.default = toCallback;
Object.defineProperty(exports, '__esModule', { value: true });
exports.toCallback = exports.default;
})));
//# sourceMappingURL=bundle.umd.js.map