Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Determine if a function is an ES6 arrow function or not.

License

NotificationsYou must be signed in to change notification settings

inspect-js/is-arrow-function

dependency statusdev dependency status

npm badge

npm module to determine if a function is an ES6 arrow function or not.

NOTE: Only works in Firefox at the moment.

Example

varisArrowFunction=require('is-arrow-function');assert(!isArrowFunction(function(){}));assert(!isArrowFunction(null));assert(isArrowFunction((a,b)=>a*b));assert(isArrowFunction(()=>42));assert(isArrowFunction(x=>x*x));assert(isArrowFunction(x=>()=>x*x));

Tests

Simply clone the repo,npm install, and runnpm test

About

Determine if a function is an ES6 arrow function or not.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks


[8]ページ先頭

©2009-2025 Movatter.jp