mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-04 12:40:05 +02:00
add some babel stuff
This commit is contained in:
21
node_modules/@babel/helper-get-function-arity/README.md
generated
vendored
Normal file
21
node_modules/@babel/helper-get-function-arity/README.md
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# @babel/helper-get-function-arity
|
||||
|
||||
Function that returns the number of arguments that a function takes.
|
||||
* Examples of what is considered an argument can be found at [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/length)
|
||||
|
||||
## Usage
|
||||
|
||||
```javascript
|
||||
import getFunctionArity from "@babel/helper-get-function-arity";
|
||||
|
||||
function wrap(state, method, id, scope) {
|
||||
// ...
|
||||
if (!t.isFunction(method)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const argumentsLength = getFunctionArity(method);
|
||||
|
||||
// ...
|
||||
}
|
||||
```
|
Reference in New Issue
Block a user