Socket
Socket
Sign inDemoInstall

is-generator-fn

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-generator-fn - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

index.d.ts

6

index.js
'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

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc