Plato on Github
Report Home
node_modules/when/lib/decorators/fold.js
Maintainability
85.12
Lines of code
16
Difficulty
10.29
Estimated Errors
0.10
Function weight
By Complexity
By SLOC
/** @license MIT License (c) copyright 2010-2014 original author or authors */ /** @author Brian Cavalier */ /** @author John Hann */ /** @author Jeff Escalante */ (function(define) { 'use strict'; define(function() { return function fold(Promise) { Promise.prototype.fold = function(fn, arg) { var promise = this._beget(); this._handler.fold(promise._handler, fn, arg); return promise; }; return Promise; }; }); }(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));