@igortrindade/lazyfy
v2.25.0
Published
Someone once said: "I choose a lazy person to do a hard job. Because a lazy person will find an easy way to do it."
Downloads
611
Readme
🚀 Quickstart
Install with your favorite package manager:
- npm :
npm i @igortrindade/lazyfy
- yarn :
yarn add @igortrindade/lazyfy
- npm :
Usage
import { ArrayHelpers } from '@igortrindade/lazyfy'
const arr = ['watermelon', 'strawberry', 'grape']
const item = ArrayHelpers.find(arr, 'grape')
// item = 'grape'
const books = [ { id: 1, title: 'Clean Code' }, { id: 2, title: 'Clean Archtecture' }, { id: 3, title: 'Refactoring' }]
const selected = ArrayHelpers.findAll(books, { id: [1, 2]})
// selected = [ { id: 1, title: 'Clean Code' }, { id: 2, title: 'Clean Archtecture' }]
const bookClean = ArrayHelpers.find(books, { title: 'CLEAN CODE' })
// Case insensitive match
// bookClean = { id: 1, title: 'Clean Code' }
// For more examples, see the live playground on: https://igortrinidad.github.io/lazyfy/
🤝 Contributing
Run into a problem? Open an issue. Want to add some feature? PRs are welcome!
👤 About the author
Feel free to contact me:
📝 License
Copyright © 2022 Igor Trindade.
This project is under MIT license.