Lodash no longer works as a dependency, Underscore is required.
See original GitHub issueTypeError: _.contains is not a function
Lodash does not have a .contains() function. I’ve searched through the code. Underscore does, however Lodash, if it had one, has removed it. As of right now, installing Restangular today will only work with Underscore.js
Docs should be updated, unless you want to go the route of adding support for the new functions in lodash.js
Issue Analytics
- State:
- Created 8 years ago
- Comments:15 (2 by maintainers)
Top Results From Across the Web
Lodash in 2022: necessary or obsolete? - Nico Zerpa
And now, the question is, are Lodash and Underscore still necessary? Or Am I adding unnecessary bloat into my project?
Read more >Solved: After updating AEM 6.5.10 underscore dependency is...
We have underscore as a dependency for out clientlibs. This was working with 6.5.5 but after 6.5.10 its not working. I see one...
Read more >Does Lodash bundle/include Underscore? - Stack Overflow
You correctly inferred that Lodash does not depend on Underscore, at least not in production. Rather, it is a fork of Underscore that...
Read more >eslint-plugin-you-dont-need-lodash-underscore - npm - Snyk
An important project maintenance signal to consider for eslint-plugin-you-dont-need-lodash-underscore is that it hasn't seen any new versions released to npm in ...
Read more >The Correct Way to Import Lodash Libraries: A Benchmark
Importing Lodash libraries doesn't need to be daunting. Get insights into the top three ways to import Lodash functions.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
you can solve this issue by adding this script after including lodash :
or you can browse the restangular.js file and change _.contains by _.includes
I wouldn’t be a good choice, but there are a ton of existing forks. @elnygren / @R-Kurbatovvakoms / @nfntynl any takers?