aboutsummaryrefslogtreecommitdiff
path: root/node_modules/function-name-support/README.md
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-08-14 05:01:11 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-08-14 05:02:09 +0200
commit363723fc84f7b8477592e0105aeb331ec9a017af (patch)
tree29f92724f34131bac64d6a318dd7e30612e631c7 /node_modules/function-name-support/README.md
parent5634e77ad96bfe1818f6b6ee70b7379652e5487f (diff)
node_modules
Diffstat (limited to 'node_modules/function-name-support/README.md')
-rw-r--r--node_modules/function-name-support/README.md61
1 files changed, 61 insertions, 0 deletions
diff --git a/node_modules/function-name-support/README.md b/node_modules/function-name-support/README.md
new file mode 100644
index 000000000..68ec9995d
--- /dev/null
+++ b/node_modules/function-name-support/README.md
@@ -0,0 +1,61 @@
+# function-name-support
+
+Feature detection for function names. See [*The names of functions in
+ES6*](http://2ality.com/2015/09/function-names-es6.html) for background.
+Provides the [same results as
+`node-compat-table`][node-compat-table].
+
+## Installation
+
+```console
+$ npm install --save function-name-support
+```
+
+## Usage
+
+```js
+const functionNameSupport = require('function-name-support')
+```
+
+### `support`
+
+A frozen object with boolean values. Compare with
+[`node-compat-table`][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`.
+
+[node-compat-table]: http://node.green/#ES2015-built-in-extensions-function--name--property