Spaces:
Runtime error
Runtime error
Download static/node_modules/call-bind/index.js from kaab4321/NarrativeFlow: direct link, hf CLI and curl.
- Browser
- Download file 1.04 kB
-
https://huggingface.co/spaces/kaab4321/NarrativeFlow/resolve/main/static/node_modules/call-bind/index.js
- Command line
-
hf download hf://spaces/kaab4321/NarrativeFlow/static/node_modules/call-bind/index.js
-
curl -L -o index.js https://huggingface.co/spaces/kaab4321/NarrativeFlow/resolve/main/static/node_modules/call-bind/index.js
1.04 kB
| ; | |
| var bind = require('function-bind'); | |
| var GetIntrinsic = require('get-intrinsic'); | |
| var setFunctionLength = require('set-function-length'); | |
| var $TypeError = require('es-errors/type'); | |
| var $apply = GetIntrinsic('%Function.prototype.apply%'); | |
| var $call = GetIntrinsic('%Function.prototype.call%'); | |
| var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); | |
| var $defineProperty = require('es-define-property'); | |
| var $max = GetIntrinsic('%Math.max%'); | |
| module.exports = function callBind(originalFunction) { | |
| if (typeof originalFunction !== 'function') { | |
| throw new $TypeError('a function is required'); | |
| } | |
| var func = $reflectApply(bind, $call, arguments); | |
| return setFunctionLength( | |
| func, | |
| 1 + $max(0, originalFunction.length - (arguments.length - 1)), | |
| true | |
| ); | |
| }; | |
| var applyBind = function applyBind() { | |
| return $reflectApply(bind, $apply, arguments); | |
| }; | |
| if ($defineProperty) { | |
| $defineProperty(module.exports, 'apply', { value: applyBind }); | |
| } else { | |
| module.exports.apply = applyBind; | |
| } | |