Socket
Socket
Sign inDemoInstall

synchronous-promise

Package Overview
Dependencies
0
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.3 to 2.0.4

index-ts.spec.js

6

dist/synchronous-promise.js

@@ -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

index-ts.spec.ts

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc