synchronous-promise
Advanced tools
Comparing version 2.0.3 to 2.0.4
@@ -10,3 +10,2 @@ (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | ||
var | ||
history = [], | ||
PENDING = "pending", | ||
@@ -17,3 +16,2 @@ RESOLVED = "resolved", | ||
function SynchronousPromise(handler) { | ||
history.push(this); | ||
this.status = PENDING; | ||
@@ -36,6 +34,2 @@ this._continuations = []; | ||
SynchronousPromise._getHistory = function () { | ||
return history.slice(0, history.length); | ||
}; | ||
SynchronousPromise.prototype = { | ||
@@ -42,0 +36,0 @@ then: function (nextFn, catchFn) { |
@@ -0,0 +0,0 @@ /// <reference path="index.d.ts" /> |
@@ -0,0 +0,0 @@ export interface SynchronousPromise<T> extends Promise<T> { |
@@ -7,3 +7,2 @@ /* jshint node: true */ | ||
var | ||
history = [], | ||
PENDING = "pending", | ||
@@ -14,3 +13,2 @@ RESOLVED = "resolved", | ||
function SynchronousPromise(handler) { | ||
history.push(this); | ||
this.status = PENDING; | ||
@@ -33,6 +31,2 @@ this._continuations = []; | ||
SynchronousPromise._getHistory = function () { | ||
return history.slice(0, history.length); | ||
}; | ||
SynchronousPromise.prototype = { | ||
@@ -39,0 +33,0 @@ then: function (nextFn, catchFn) { |
@@ -0,0 +0,0 @@ /* |
{ | ||
"name": "synchronous-promise", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"description": "Synchronous Promise-like prototype to use in testing where you would have used an ES6 Promise", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -0,0 +0,0 @@ # synchronous-promise |
@@ -0,0 +0,0 @@ { |
Sorry, the diff of this file is not supported yet
1680
68388