Socket
Socket
Sign inDemoInstall

sinon-as-promised

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sinon-as-promised - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

LICENSE

2

bower.json
{
"name": "sinon-as-promised",
"version": "2.0.2",
"version": "2.0.3",
"homepage": "https://github.com/bendrucker/sinon-as-promised",

@@ -5,0 +5,0 @@ "authors": [

{
"name": "sinon-as-promised",
"version": "2.0.2",
"version": "2.0.3",
"description": "Sugar methods for using sinon.js stubs with promises",

@@ -5,0 +5,0 @@ "main": "./src",

@@ -6,4 +6,11 @@ 'use strict';

function ensure (actual, expected) {
expected.forEach(function (method) {
if (actual.indexOf(method) === -1) actual.push(method);
});
return actual;
}
function thenable (promiseFactory) {
return Object.getOwnPropertyNames(Promise.prototype)
return ensure(Object.getOwnPropertyNames(Promise.prototype), ['catch', 'finally'])
.filter(function (method) {

@@ -10,0 +17,0 @@ return method !== 'then';

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc