Socket
Socket
Sign inDemoInstall

is-arrow-function

Package Overview
Dependencies
0
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.0.2

.nvmrc

3

index.js
var toStr = Object.prototype.toString;
var fnToStr = Function.prototype.toString;
var isFnRegex = /^\s*function/;

@@ -7,4 +8,4 @@ module.exports = function isArrowFunction(fn) {

var fnStr = toStr.call(fn);
return fnStr === '[object Function]' && fnToStr.call(fn).indexOf('function') !== 0;
return fnStr === '[object Function]' && !isFnRegex.test(fnToStr.call(fn));
};
{
"name": "is-arrow-function",
"version": "1.0.1",
"version": "1.0.2",
"description": "Determine if a function is an ES6 arrow function or not.",
"main": "index.js",
"scripts": {
"test": "node --harmony test.js"
"test": "node --harmony test/index.js",
"coverage": "covert test/index.js",
"coverage-quiet": "covert test/index.js --quiet"
},

@@ -29,6 +31,7 @@ "repository": {

"devDependencies": {
"tape": "~2.3.0"
"tape": "~2.14.0",
"covert": "~0.4.0"
},
"testling": {
"files": "test.js",
"files": "test/index.js",
"browsers": [

@@ -49,4 +52,7 @@ "iexplore/6.0..latest",

]
},
"engines": {
"node": ">= 0.4"
}
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc