Skip to content

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."

License

Notifications You must be signed in to change notification settings

igortrinidad/lazyfy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

2ddb6e9 Β· Feb 27, 2025
Nov 16, 2022
Feb 2, 2025
Nov 16, 2022
Feb 27, 2025
Feb 8, 2025
Sep 8, 2022
Mar 15, 2024
Feb 7, 2025
Aug 30, 2022
Feb 27, 2025
Feb 19, 2022
Mar 16, 2023
Feb 27, 2025
Feb 27, 2025
Nov 16, 2022
Nov 15, 2022
Nov 16, 2022
Nov 16, 2022

Repository files navigation

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.

About

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."

Resources

License

Stars

Watchers

Forks

Packages

No packages published