@igortrindade/lazyfy
TypeScript icon, indicating that this package has built-in type declarations

2.25.0 • Public • Published

lazyfy

A lightweight, zero dependency set of tools that i use in almost any project

npm CI License

🚀 Quickstart

  1. Install with your favorite package manager:

    • npm : npm i @igortrindade/lazyfy
    • yarn : yarn add @igortrindade/lazyfy
  2. 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:

GitHub

GitHub

twitter: @souigortrindade

📝 License

Copyright © 2022 Igor Trindade.
This project is under MIT license.

Readme

Keywords

none

Package Sidebar

Install

npm i @igortrindade/lazyfy

Weekly Downloads

173

Version

2.25.0

License

MIT

Unpacked Size

1.96 MB

Total Files

156

Last publish

Collaborators

  • igortrindade.dev