Socket
Socket
Sign inDemoInstall

function-name-support

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

function-name-support


Version published
Maintainers
1
Created

Readme

Source

function-name-support

Feature detection for function names. See The names of functions in ES6 for background. Provides the same results as node-compat-table.

Installation

$ npm install --save function-name-support

Usage

const functionNameSupport = require('function-name-support')

support

A frozen object with boolean values. Compare with node-compat-table:

  • function statements: functionStatements
  • function expressions: functionExpressions
  • new Function: newFunction
  • bound functions: boundFunctions
  • variables (function): functionVariables
  • object methods (function): functionObjectMethods
  • accessor properties: accessorProperties
  • shorthand methods: shorthandMethods
  • symbol-keyed methods: symbolKeyedMethods
  • class statements: classStatements
  • class expressions: classExpressions
  • variables (class): classVariables
  • object methods (class): classObjectMethods
  • class prototype methods: classPrototypeMethods
  • class static methods: classStaticMethods

hasFullSupport

A boolean indicating whether all known function name inferences are supported.

bitFlags

An integer that stores a serialization of the support object. Useful when storing a function name (or lack thereof) for later comparisons along with details on whether the function name was inferable at all.

isSubsetOf(otherFlags): boolean

Helper method for comparing bitFlags. Returns true if it is a subset of otherFlags.

isSupersetOf(otherFlags: number): boolean

Helper method for comparing bitFlags. Returns true if it is a superset of otherFlags.

FAQs

Last updated on 19 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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