https://github.com/danielstern/underscore-without-underscore
Underscore's Handy Functions without the need for the library Underscore
https://github.com/danielstern/underscore-without-underscore
Last synced: 10 months ago
JSON representation
Underscore's Handy Functions without the need for the library Underscore
- Host: GitHub
- URL: https://github.com/danielstern/underscore-without-underscore
- Owner: danielstern
- Created: 2014-05-06T18:46:11.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-05-06T18:56:02.000Z (about 12 years ago)
- Last Synced: 2025-04-05T08:25:43.447Z (about 1 year ago)
- Language: JavaScript
- Size: 137 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Underscore-Without-Underscore
=============================

Everyone loves Underscore.js, but sometimes you just want the one function, without the hassle of needing the whole library.
Enter Underscore without Underscore! It is a compilation of Underscore and Lodash's favorite functions in drop-in format.
## Getting Started
Just copy whatever functions you need out of this file or the _.js file and drop them into your code. Presto!
### Collaboration
Please add functions to this as you need them for your drop ins and issue a pull request.
### Supported So Far: *2*
```javascript
/**
*
* Each
*
**/
var _ = _ || {};
_.each = _.each || function(arr, func) {
for (var i = 0; i < arr.length; i++) {
func(arr[i]);
}
}
/**
*
* Filter
*
**/
var _ = _ || {};
_.filter = _.filter || function(arr, filt) {
var r = [];
for (var i = 0; i < arr.length; i++) {
if (filt(arr[i])) r.push(arr[i])
}
return r;
}
```