diff options
| author | Jesse Vincent <jesse@fsck.com> | 2026-03-11 13:17:52 -0700 |
|---|---|---|
| committer | Jesse Vincent <jesse@fsck.com> | 2026-03-11 13:17:52 -0700 |
| commit | 7619570679c7bd3ecc747cc4e607886fe214d968 (patch) | |
| tree | 7352714c5b6fd7d61fa78c8683044ddb195129d0 /skills/brainstorming/scripts/node_modules/function-bind/implementation.js | |
| parent | 8d9b94eb8d07b65d23137e034fcd9bfabd49a21c (diff) | |
Remove vendored node_modules, swap to zero-dep server.js
Delete 717 files: index.js, package.json, package-lock.json, and
the entire node_modules directory (express, ws, chokidar + deps).
Update start-server.sh to use server.js. Remove gitignore exception.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'skills/brainstorming/scripts/node_modules/function-bind/implementation.js')
| -rw-r--r-- | skills/brainstorming/scripts/node_modules/function-bind/implementation.js | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/skills/brainstorming/scripts/node_modules/function-bind/implementation.js b/skills/brainstorming/scripts/node_modules/function-bind/implementation.js deleted file mode 100644 index fd4384c..0000000 --- a/skills/brainstorming/scripts/node_modules/function-bind/implementation.js +++ /dev/null @@ -1,84 +0,0 @@ -'use strict'; - -/* eslint no-invalid-this: 1 */ - -var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; -var toStr = Object.prototype.toString; -var max = Math.max; -var funcType = '[object Function]'; - -var concatty = function concatty(a, b) { - var arr = []; - - for (var i = 0; i < a.length; i += 1) { - arr[i] = a[i]; - } - for (var j = 0; j < b.length; j += 1) { - arr[j + a.length] = b[j]; - } - - return arr; -}; - -var slicy = function slicy(arrLike, offset) { - var arr = []; - for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { - arr[j] = arrLike[i]; - } - return arr; -}; - -var joiny = function (arr, joiner) { - var str = ''; - for (var i = 0; i < arr.length; i += 1) { - str += arr[i]; - if (i + 1 < arr.length) { - str += joiner; - } - } - return str; -}; - -module.exports = function bind(that) { - var target = this; - if (typeof target !== 'function' || toStr.apply(target) !== funcType) { - throw new TypeError(ERROR_MESSAGE + target); - } - var args = slicy(arguments, 1); - - var bound; - var binder = function () { - if (this instanceof bound) { - var result = target.apply( - this, - concatty(args, arguments) - ); - if (Object(result) === result) { - return result; - } - return this; - } - return target.apply( - that, - concatty(args, arguments) - ); - - }; - - var boundLength = max(0, target.length - args.length); - var boundArgs = []; - for (var i = 0; i < boundLength; i++) { - boundArgs[i] = '$' + i; - } - - bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); - - if (target.prototype) { - var Empty = function Empty() {}; - Empty.prototype = target.prototype; - bound.prototype = new Empty(); - Empty.prototype = null; - } - - return bound; -}; |
