UNPKG

will

Version:

Flexible futures

35 lines (24 loc) 965 B
// Generated by CoffeeScript 1.6.3 (function() { var Acceptance, Deferral, isArray, slice, state, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; state = require('state'); Deferral = require('./deferral'); slice = Array.prototype.slice; isArray = require('util').isArray; module.exports = Acceptance = (function(_super) { __extends(Acceptance, _super); function Acceptance(values) { this._values = isArray(values) ? slice.call(values) : [values]; } state(Acceptance.prototype, { resolved: { completed: { accepted: state('initial final') } } }); return Acceptance; })(Deferral); }).call(this);