🌱 planting ideas 🌱

Lodash - quick experiments in Chrome

chrome://settings/content/javascript
image.png

1
2
3
4
var el = document.createElement('script');
el.src = "https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.20/lodash.min.js";
el.type = "text/javascript";
document.head.appendChild(el);
1
2
// Use the following in a bookmarklet:
javascript:var el=document.createElement('script');el.src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.20/lodash.min.js";el.type = "text/javascript";document.head.appendChild(el);

Remove multiple keys from an object
_.omit

Divide array in batch
_.chunk

Remove elements from an array at index
_.pullAt

Implementation in Native
https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore