Comments (6)
There are some features that lo-dash has that are very convenient, in particular the _.find
function (and soon the _.isMatch
function when v3.0.0 lands). I admit that I could use less of lo-dash by simply requiring the modules for each associated function (e.g. require('lodash/find')
instead of the full require('lodash')
.
The only problem with your PR using native is that you will also have to provide an implementation of _.find
which, using where-style matching, is probably non-trivial.
Thoughts?
from auth-header.
@izaakschroeder I agree, and requiring only the methods that you use would be a good alternative. Plus some the methods aren't really needed, you could use typeof
and other JS features instead.
Why would _.find
have anything to do with map/filter, which are native? _.find
will still work perfectly fine if you don't use _.map
/_.filter
.
from auth-header.
Why would
_.find
have anything to do withmap
/filter
, which are native?_.find
will still work perfectly fine, if you replace [...]_.map
/_.filter
.
Yes! This is true. I feel like it's better to be consistent and performant in this case though; as heavy as lo-dash feels, it still actually outperforms native by a reasonable amount: http://jsperf.com/native-for-loop-vs-array-foreach-and-array-map-vs-lodas.
With that in mind I think the best solution going forward is to use individual function modules (e.g. require('lodash/foo')
as opposed to entire lo-dash, but I don't think throwing lo-dash out is going to be on the table, including _.map
and _.filter
.
from auth-header.
I'm fine with that, since it's your call 😄
from auth-header.
It's been a long time 😄 but lodash
is no more! #13
from auth-header.
Nice!
from auth-header.
Related Issues (5)
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 auth-header.