4.2.1 ⢠Published 9 months ago
@matheuscaetano/helprs v4.2.1
@matheuscaetano/helprs
š A collection of utility functions written in JavaScript/TypeScript, focused on productivity, readability, and code reuse.
š¦ Installation
npm install @matheuscaetano/helprsor
yarn add @matheuscaetano/helprsš ļø Features
| Function | Description |
|---|---|
formatCnpjCpf | Formats a CPF or CNPJ number into a standardized string format. |
first | Returns the first portion of strings, numbers, booleans, arrays, or objects. Supports amount option. |
last | Returns the last portion of strings, numbers, booleans, arrays, or objects. Supports amount option. |
removeFirst | Removes the first portion of strings, numbers, arrays, or objects. Supports amount option. |
removeLast | Removes the last portion of strings, numbers, arrays, or objects. Supports amount option. |
uniqId | Generates a unique identifier using random base-36 strings. |
uuid | Generates a RFC4122 version 4 UUID. |
concatPath | Concatenates and normalizes path segments, removing duplicate slashes. |
removeNonNumbers | Removes all non-numeric characters from a string. |
tw | Concatenates and deduplicates Tailwind CSS class names. Supports strings, arrays, numbers, nulls, and undefined values. |
keyValues | Extracts values from a list of objects based on a key. Can remove duplicates. |
removeDuplicates | Removes duplicate characters in strings or elements in arrays. |
ā Usage Example
import { first, uuid, concatPath } from '@matheuscaetano/helprs';
console.log(first('Hello')); // H
console.log(uuid()); // Generates a UUID
console.log(concatPath('/api/', '/user/', '123')); // api/user/123š License
MIT Ā© Matheus Caetanomatheuscaetano/helprs
3.5.7
10 months ago
3.5.6
10 months ago
3.5.8
10 months ago
4.0.1
9 months ago
4.0.0
9 months ago
4.2.1
9 months ago
4.2.0
9 months ago
4.0.2
9 months ago
4.1.4
9 months ago
4.1.3
9 months ago
4.1.5
9 months ago
4.1.0
9 months ago
4.1.2
9 months ago
4.1.1
9 months ago
3.5.5
2 years ago
3.5.4
2 years ago
3.5.3
2 years ago
3.5.2
2 years ago
3.5.1
2 years ago
3.4.0
2 years ago
3.3.1
2 years ago
3.3.0
2 years ago
3.4.1
2 years ago
3.2.0
2 years ago
2.2.1
2 years ago
2.1.2
2 years ago
2.2.0
2 years ago
2.1.1
2 years ago
2.2.3
2 years ago
2.1.4
2 years ago
2.2.2
2 years ago
2.1.3
2 years ago
2.2.5
2 years ago
2.1.6
2 years ago
2.2.4
2 years ago
2.1.5
2 years ago
2.2.7
2 years ago
2.2.6
2 years ago
2.2.10
2 years ago
2.1.0
2 years ago
2.0.0
2 years ago
3.0.4
2 years ago
3.0.3
2 years ago
3.0.2
2 years ago
3.0.1
2 years ago
3.1.5
2 years ago
3.0.5
2 years ago
2.2.9
2 years ago
2.2.8
2 years ago
3.0.0
2 years ago
1.0.0
2 years ago