{"_id":"function.call-x","name":"function.call-x","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"function.call-x","version":"1.0.0","description":"Function.prototype.call()","keywords":["function","apply"],"homepage":"https://github.com/xsfj/function-call#readme","bugs":{"url":"https://github.com/xsfj/function-call/issues"},"repository":{"type":"git","url":"git+https://github.com/xsfj/function-call.git"},"license":"MIT","author":{"name":"Fox Jones"},"type":"commonjs","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"gitHead":"5c0ee020b569de0c46ee79fbe8379d8184c440d3","_id":"function.call-x@1.0.0","_nodeVersion":"24.11.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-k/QWjkUv4WtCiAhH27Z0ulToohVPb//7zn5UkMUSZefe4ygabjquyErtkUlkq9Fy8bBFekNjkYZJdWtGVdCNXA==","shasum":"579e69037561dad8105daaa3ef744432e86dbec3","tarball":"https://registry.npmjs.org/function.call-x/-/function.call-x-1.0.0.tgz","fileCount":3,"unpackedSize":2499,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDXVtNsC3vWUHoZ/NDOzC/UTovCJc3tarofVHSf9Bsq5wIhAJpMazNBRTfkr6bJSZ839mHXUk1Mwi8LYo65/yenrcCk"}]},"_npmUser":{"name":"xsfj","email":"oagde5@gmail.com"},"directories":{},"maintainers":[{"name":"xsfj","email":"oagde5@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/function.call-x_1.0.0_1766351830855_0.5502618954429432"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-21T21:17:10.854Z","1.0.0":"2025-12-21T21:17:11.019Z","modified":"2025-12-21T21:17:11.366Z"},"maintainers":[{"name":"xsfj","email":"oagde5@gmail.com"}],"description":"Function.prototype.call()","homepage":"https://github.com/xsfj/function-call#readme","keywords":["function","apply"],"repository":{"type":"git","url":"git+https://github.com/xsfj/function-call.git"},"author":{"name":"Fox Jones"},"bugs":{"url":"https://github.com/xsfj/function-call/issues"},"license":"MIT","readme":"# function.call-x\r\n\r\nRobustly caches `Function.prototype.call` for reliable usage across environments.\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm install function.call-x\r\n```\r\n\r\n## Usage\r\n\r\n```javascript\r\nconst call = require('function.call-x');\r\n\r\nfunction greet(name) {\r\n  return `Hello, ${name}!`;\r\n}\r\n\r\n// Use call to invoke the function\r\nconst result = call.call(greet, null, 'World');\r\nconsole.log(result); // \"Hello, World!\"\r\n```\r\n\r\n## Why?\r\n\r\nThis module caches a reference to the native `Function.prototype.call` method. This is useful in scenarios where:\r\n\r\n- You need to ensure you're using the original, unmodified `call` method\r\n- Third-party code may have modified or overridden `Function.prototype.call`\r\n- You want to protect against prototype pollution\r\n- You're building low-level utility libraries that need guaranteed native behavior\r\n\r\n## API\r\n\r\nThe module exports the cached `Function.prototype.call` method directly.\r\n\r\n```javascript\r\ncall.call(func, thisArg, ...args)\r\n```\r\n\r\n- **func**: The function to invoke\r\n- **thisArg**: The value to use as `this` when calling the function\r\n- **...args**: Individual arguments to pass to the function\r\n\r\n## Example\r\n\r\n```javascript\r\nconst call = require('function.call-x');\r\n\r\nconst obj = {\r\n  value: 42,\r\n  getValue: function(multiplier, offset) {\r\n    return this.value * multiplier + offset;\r\n  }\r\n};\r\n\r\nconst result = call.call(obj.getValue, obj, 2, 10);\r\nconsole.log(result); // 94\r\n```\r\n\r\n## Additional Example\r\n\r\n```javascript\r\nconst call = require('function.call-x');\r\n\r\n// Using with array methods\r\nconst array = [1, 2, 3, 4, 5];\r\nconst slice = call.bind(Array.prototype.slice);\r\nconst subset = slice(array, 1, 4);\r\nconsole.log(subset); // [2, 3, 4]\r\n\r\n// Using with string methods\r\nconst toUpperCase = call.bind(String.prototype.toUpperCase);\r\nconsole.log(toUpperCase('hello')); // \"HELLO\"\r\n```\r\n\r\n## License\r\n\r\nMIT","readmeFilename":"README.md","_rev":"1-aab05d078b1a6467e8e4587967238093"}