is-generator-fn
Advanced tools
Comparing version 1.0.0 to 2.0.0
'use strict'; | ||
var toString = Object.prototype.toString; | ||
const {toString} = Object.prototype; | ||
module.exports = function (fn) { | ||
module.exports = fn => { | ||
if (typeof fn !== 'function') { | ||
@@ -12,1 +12,3 @@ return false; | ||
}; | ||
module.exports.default = module.exports; |
{ | ||
"name": "is-generator-fn", | ||
"version": "1.0.0", | ||
"description": "Check if something is a generator function", | ||
"license": "MIT", | ||
"repository": "sindresorhus/is-generator-fn", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "sindresorhus.com" | ||
}, | ||
"engines": { | ||
"node": ">=0.10.0" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"keywords": [ | ||
"generator", | ||
"gen", | ||
"function", | ||
"func", | ||
"fn", | ||
"is", | ||
"check", | ||
"detect", | ||
"yield" | ||
], | ||
"devDependencies": { | ||
"ava": "*", | ||
"xo": "*" | ||
} | ||
"name": "is-generator-fn", | ||
"version": "2.0.0", | ||
"description": "Check if something is a generator function", | ||
"license": "MIT", | ||
"repository": "sindresorhus/is-generator-fn", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "sindresorhus.com" | ||
}, | ||
"engines": { | ||
"node": ">=6" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava && tsd-check" | ||
}, | ||
"files": [ | ||
"index.js", | ||
"index.d.ts" | ||
], | ||
"keywords": [ | ||
"generator", | ||
"function", | ||
"func", | ||
"fn", | ||
"is", | ||
"check", | ||
"detect", | ||
"yield", | ||
"type" | ||
], | ||
"devDependencies": { | ||
"ava": "^1.0.1", | ||
"tsd-check": "^0.3.0", | ||
"xo": "^0.23.0" | ||
} | ||
} |
@@ -9,3 +9,3 @@ # is-generator-fn [![Build Status](https://travis-ci.org/sindresorhus/is-generator-fn.svg?branch=master)](https://travis-ci.org/sindresorhus/is-generator-fn) | ||
``` | ||
$ npm install --save is-generator-fn | ||
$ npm install is-generator-fn | ||
``` | ||
@@ -27,4 +27,9 @@ | ||
## Related | ||
- [is](https://github.com/sindresorhus/is) - Type check values | ||
## License | ||
MIT © [Sindre Sorhus](http://sindresorhus.com) | ||
MIT © [Sindre Sorhus](https://sindresorhus.com) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
2822
5
14
34
0
3