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

co

Package Overview
Dependencies
Maintainers
3
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

co - npm Package Compare versions

Comparing version 4.3.1 to 4.4.0

7

History.md
4.4.0 / 2014-02-14
==================
* refactor `isGeneratorFunction`
* expose generator function from `co.wrap()`
* drop support for node < 0.12
4.3.0 / 2014-02-05

@@ -3,0 +10,0 @@ ==================

17

index.js

@@ -27,5 +27,7 @@

co.wrap = function (fn) {
return function () {
createPromise.__generatorFunction__ = fn;
return createPromise;
function createPromise() {
return co.call(this, fn.apply(this, arguments));
};
}
};

@@ -38,3 +40,3 @@

* @param {Function} fn
* @return {Function}
* @return {Promise}
* @api public

@@ -218,8 +220,5 @@ */

var constructor = obj.constructor;
var proto = constructor.prototype;
var name = constructor.displayName || constructor.name;
var nameLooksRight = 'GeneratorFunction' == name;
var methodsLooksRight = 'function' == typeof proto.next &&
'function' == typeof proto.throw;
return nameLooksRight || methodsLooksRight;
if (!constructor) return false;
if ('GeneratorFunction' === constructor.name || 'GeneratorFunction' === constructor.displayName) return true;
return isGenerator(constructor.prototype);
}

@@ -226,0 +225,0 @@

{
"name": "co",
"version": "4.3.1",
"version": "4.4.0",
"description": "generator async control flow goodness",

@@ -13,3 +13,2 @@ "keywords": [

"devDependencies": {
"bluebird": "^2.0.0",
"istanbul-harmony": "0",

@@ -20,3 +19,3 @@ "mocha": "^2.0.0",

"scripts": {
"test": "mocha --harmony --reporter spec",
"test": "mocha --harmony",
"test-cov": "node --harmony node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- --reporter dot",

@@ -32,4 +31,4 @@ "test-travis": "node --harmony node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha --report lcovonly -- --reporter dot"

"iojs": ">= 1.0.0",
"node": ">= 0.11.16"
"node": ">= 0.12.0"
}
}
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