Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

instapromise

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

instapromise - npm Package Compare versions

Comparing version 0.8.0 to 1.0.0

7

index.js

@@ -6,3 +6,3 @@ // Generated by CoffeeScript 1.9.0

__doc__ = "If you use this library then if you put `.promise` after a Node-style async\nfunction, it will turn it into a function that returns a Promise instead of\ntaking a callback.\n\n```\n promisify = require 'instapromise'\n p = fs.readFile.promise \"/tmp/hello\", 'utf8'\n p.then(console.log)\n```\n\nIf you want to promisify methods, use `.promise` after the object and before\nthe method name.\n\n```\n promisify = require 'instapromise'\n p = fs.promise.readFile \"/tmp/hello\", 'utf8'\n p.then(console.log)\n```\n\nThis code is based on the proxying code used in fibrous.\nhttps://github.com/goodeggs/fibrous/blob/master/src/fibrous.coffee\n";
__doc__ = "If you use this library then if you put `.promise` after a Node-style async\nfunction, it will turn it into a function that returns a Promise instead of\ntaking a callback.\n\nThe original function is available as a property on the Promise generating\nfunction (`.___instapromiseOriginalFunction___`).\n\n```\n promisify = require 'instapromise'\n p = fs.readFile.promise \"/tmp/hello\", 'utf8'\n p.then(console.log)\n```\n\nIf you want to promisify methods, use `.promise` after the object and before\nthe method name.\n\n```\n promisify = require 'instapromise'\n p = fs.promise.readFile \"/tmp/hello\", 'utf8'\n p.then(console.log)\n```\n\nThis code is based on the proxying code used in fibrous.\nhttps://github.com/goodeggs/fibrous/blob/master/src/fibrous.coffee\n";

@@ -56,3 +56,4 @@ Promise = require('native-or-bluebird');

}
return target[key] = proxyFn(key);
target[key] = proxyFn(key);
return target[key].___instapromiseOriginalFunction___ = src[key];
};

@@ -78,3 +79,3 @@ for (_i = 0, _len = _ref.length; _i < _len; _i++) {

}
})(), Object.getPrototypeOf(that) !== Function.prototype ? func.__proto__ = Object.getPrototypeOf(that)[prop] : void 0, func) : Object.create(Object.getPrototypeOf(that) && Object.getPrototypeOf(that)[prop] || Object.prototype);
})(), Object.getPrototypeOf(that) !== Function.prototype ? func.__proto__ = Object.getPrototypeOf(that)[prop] : void 0, func.___instapromiseOriginalFunction___ = that, func) : Object.create(Object.getPrototypeOf(that) && Object.getPrototypeOf(that)[prop] || Object.prototype);
result.that = that;

@@ -81,0 +82,0 @@ return proxyAll(that, result, function(key) {

{
"name": "instapromise",
"version": "0.8.0",
"version": "1.0.0",
"description": "Promisify node style async functions by putting a .promise after them (or after the object for methods)",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -8,2 +8,5 @@ # instapromise

The original function is available as a property on the Promise generating
function (`.___instapromiseOriginalFunction___`).
```

@@ -10,0 +13,0 @@ promisify = require 'instapromise'

Sorry, the diff of this file is not supported yet

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