Socket
Socket
Sign inDemoInstall

co

Package Overview
Dependencies
0
Maintainers
3
Versions
34
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.1.0 to 4.2.0

7

History.md
4.2.0 / 2015-01-20
==================
* support comparing generator functions with ES6 transpilers
4.1.0 / 2014-12-26

@@ -6,3 +11,3 @@ ==================

* fix memory leak #180
4.0.2 / 2014-12-18

@@ -9,0 +14,0 @@ ==================

@@ -216,7 +216,15 @@

function isGeneratorFunction(obj) {
var constructor = obj.constructor;
return constructor && 'GeneratorFunction' == constructor.name;
return obj && obj.constructor == generator.constructor;
}
/**
* Empty generator function for constructor comparison.
* This allows comparisons to work with ES6 transpilers.
*
* @api private
*/
function* generator() {}
/**
* Check for plain object.

@@ -223,0 +231,0 @@ *

2

package.json
{
"name": "co",
"version": "4.1.0",
"version": "4.2.0",
"description": "generator async control flow goodness",

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

@@ -14,6 +14,6 @@ # co

`co@4.0.0` has been released, which relies promises.
It is now a stepping stone towards [ES7 async/await](https://github.com/lukehoban/ecmascript-asyncawait).
`co@4.0.0` has been released, which now relies on promises.
It is a stepping stone towards [ES7 async/await](https://github.com/lukehoban/ecmascript-asyncawait).
The primary API change is how `co()` is invoked.
Before, `co` returned a "thunk", which you then call with a callback with optional arguments.
Before, `co` returned a "thunk", which you then called with a callback and optional arguments.
Now, `co()` returns a promise.

@@ -20,0 +20,0 @@

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