Comments (3)
That's a nice thought, but I'm afraid that pulling off a reference to Function#call isn't going to get you the original method -- it's just going to get you a broken version of call
.
slice = Array.prototype.slice ;
sliceCall = Array.prototype.slice.call;
slice.call([1, 2, 3, 4, 5], 2)
=> [3, 4, 5]
sliceCall([1, 2, 3, 4, 5], 2)
=> TypeError: Type error
Closing the ticket.
from underscore.
Well, I was thinking
sliceCall = _.bind(slice.call, slice)
but I guess that doesn't save anything since .apply still has to be run in the func returned by .bind. :-/
from underscore.
Sure, but an extra function invocation is slower than a property access in any case:
from underscore.
Related Issues (20)
- Git.io deprecation notice
- webpack - module federation "No version" warning as a shared module with version
- Minor release with module federation "no version" fix? HOT 2
- 1.13.5 fails to install in a node.js docker container HOT 14
- Npm install fails due to post install script HOT 4
- Patch is a dev dependency in 1.13.5. HOT 3
- Underscore v1.13.5 install error HOT 9
- [email protected] - patch-package not found HOT 3
- Fails to install with pnpm HOT 1
- Modular import cause error in typescript apps HOT 4
- Missing link HOT 7
- Windows Defender automatically deletes "v1.13.6 UMD (Development)" HOT 3
- Vulnerable dependencies (indirect security issues) HOT 1
- Run debounce() callback if browser tab is closed HOT 1
- "supportsDataView" checks DataView is defined but not if it has a constructor
- Why debounce debounce asap case expect this answer? HOT 1
- whether isObject is correct for new Boolean HOT 2
- Alphabetize exports in underscore.js HOT 2
- Mention _.VERSION in the documentation HOT 3
- Are there any plans for the next version release? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from underscore.