Socket
Socket
Sign inDemoInstall

is-generator-function

Package Overview
Dependencies
0
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

.nvmrc

73

.jscs.json
{
"requireCurlyBraces": ["if", "else", "for", "while", "do", "try", "catch"],
"additionalRules": [],
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"],
"requireCurlyBraces": ["if", "else", "for", "while", "do", "try", "catch"],
"disallowSpaceAfterKeywords": [],
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"],
"requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true },
"requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
"disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
"requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
"disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true },
"disallowSpaceAfterKeywords": [],
"disallowSpacesInsideParentheses": true,
"requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true },
"requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
"disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
"requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
"disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true },
"disallowSpacesInsideArrayBrackets": true,
"disallowSpacesInsideParentheses": true,
"disallowQuotedKeysInObjects": "allButReserved",
"disallowSpacesInsideArrayBrackets": true,
"disallowSpaceAfterObjectKeys": true,
"disallowQuotedKeysInObjects": "allButReserved",
"requireCommaBeforeLineBreak": true,
"disallowSpaceAfterObjectKeys": true,
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
"requireSpaceAfterPrefixUnaryOperators": [],
"requireCommaBeforeLineBreak": true,
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
"requireSpaceBeforePostfixUnaryOperators": [],
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
"requireSpaceAfterPrefixUnaryOperators": [],
"disallowSpaceBeforeBinaryOperators": [],
"requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
"requireSpaceBeforePostfixUnaryOperators": [],
"requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
"disallowSpaceAfterBinaryOperators": [],
"disallowSpaceBeforeBinaryOperators": [],
"requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
"disallowImplicitTypeConversion": ["binary", "string"],
"requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
"disallowSpaceAfterBinaryOperators": [],
"disallowKeywords": ["with", "eval"],
"disallowImplicitTypeConversion": ["binary", "string"],
"validateLineBreaks": "LF",
"disallowKeywords": ["with", "eval"],
"requireKeywordsOnNewLine": [],
"disallowKeywordsOnNewLine": ["else"],
"requireKeywordsOnNewLine": [],
"disallowKeywordsOnNewLine": ["else"],
"requireLineFeedAtFileEnd": true,
"requireLineFeedAtFileEnd": true,
"disallowTrailingWhitespace": true,
"disallowTrailingWhitespace": true,
"excludeFiles": ["node_modules/**", "vendor/**"],
"disallowTrailingComma": true,
"disallowMultipleLineStrings": true,
"excludeFiles": ["node_modules/**", "vendor/**"],
"additionalRules": []
"disallowMultipleLineStrings": true,
"requireDotNotation": true,
"requireParenthesesAroundIIFE": true,
"validateLineBreaks": "LF",
"validateQuoteMarks": {
"escape": true,
"mark": "'"
}
}

@@ -0,1 +1,3 @@

'use strict';
var toStr = Object.prototype.toString;

@@ -6,3 +8,2 @@ var fnToStr = Function.prototype.toString;

module.exports = function isGeneratorFunction(fn) {
"use strict";
var fnStr = toStr.call(fn);

@@ -9,0 +10,0 @@ return fnStr === '[object Function]' && isFnRegex.test(fnToStr.call(fn));

{
"name": "is-generator-function",
"version": "1.0.0",
"version": "1.0.1",
"description": "Determine if a function is an ES6 generator function or not.",

@@ -29,8 +29,8 @@ "main": "index.js",

},
"dependencies": {
},
"dependencies": {},
"devDependencies": {
"tape": "~2.14.0",
"covert": "~0.4.0",
"jscs": "~1.5.8"
"make-generator-function": "~1.0.0",
"tape": "~3.0.3",
"covert": "1.0.0",
"jscs": "~1.8.1"
},

@@ -37,0 +37,0 @@ "testling": {

#is-generator-function <sup>[![Version Badge][2]][1]</sup>
[![Build Status][3]][4] [![dependency status][5]][6] [![dev dependency status][7]][8]
[![Build Status][3]][4]
[![dependency status][5]][6]
[![dev dependency status][7]][8]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]

@@ -25,7 +29,7 @@ [![npm badge][11]][1]

[2]: http://vb.teelaun.ch/ljharb/is-generator-function.svg
[3]: https://travis-ci.org/ljharb/is-generator-function.png
[3]: https://travis-ci.org/ljharb/is-generator-function.svg
[4]: https://travis-ci.org/ljharb/is-generator-function
[5]: https://david-dm.org/ljharb/is-generator-function.png
[5]: https://david-dm.org/ljharb/is-generator-function.svg
[6]: https://david-dm.org/ljharb/is-generator-function
[7]: https://david-dm.org/ljharb/is-generator-function/dev-status.png
[7]: https://david-dm.org/ljharb/is-generator-function/dev-status.svg
[8]: https://david-dm.org/ljharb/is-generator-function#info=devDependencies

@@ -35,2 +39,6 @@ [9]: https://ci.testling.com/ljharb/is-generator-function.png

[11]: https://nodei.co/npm/is-generator-function.png?downloads=true&stars=true
[license-image]: http://img.shields.io/npm/l/is-generator-function.svg
[license-url]: LICENSE
[downloads-image]: http://img.shields.io/npm/dm/is-generator-function.svg
[downloads-url]: http://npm-stat.com/charts.html?package=is-generator-function

@@ -1,6 +0,6 @@

"use strict";
'use strict';
var test = require('tape');
var isGeneratorFunction = require('../index');
var generatorFunc = require('../test/make-generator-fn');
var generatorFunc = require('make-generator-function');

@@ -7,0 +7,0 @@ var forEach = function (arr, func) {

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