https://github.com/cyansalt/lazer
A Library of Lazy Evaluation for JavaScript Array.
https://github.com/cyansalt/lazer
Last synced: about 1 month ago
JSON representation
A Library of Lazy Evaluation for JavaScript Array.
- Host: GitHub
- URL: https://github.com/cyansalt/lazer
- Owner: CyanSalt
- Created: 2017-01-15T11:24:35.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-01-24T07:46:58.000Z (over 9 years ago)
- Last Synced: 2025-04-25T12:07:09.720Z (about 1 year ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# lazer
A Library of Lazy Evaluation for JavaScript Array.
### How to use
```javascript
import Lazer from 'somewhere'
Lazer.from([2, 4, 8])
.filter(i => i > 3)
.map(i => i + 1)
.reduce((a, c) => a + c, 0)
// 14
```
### Why Lazer?
In general, `Lazer` is a little bit slower than `Array` because of its complexity, but `Lazer` can make you decrease a lot of memory usage.