4.2.1 • Published 9 months ago

@matheuscaetano/helprs v4.2.1

Weekly downloads
-
License
ISC
Repository
github
Last release
9 months ago

@matheuscaetano/helprs

šŸš€ A collection of utility functions written in JavaScript/TypeScript, focused on productivity, readability, and code reuse.

šŸ“¦ Installation

npm install @matheuscaetano/helprs

or

yarn add @matheuscaetano/helprs

šŸ› ļø Features

FunctionDescription
formatCnpjCpfFormats a CPF or CNPJ number into a standardized string format.
firstReturns the first portion of strings, numbers, booleans, arrays, or objects. Supports amount option.
lastReturns the last portion of strings, numbers, booleans, arrays, or objects. Supports amount option.
removeFirstRemoves the first portion of strings, numbers, arrays, or objects. Supports amount option.
removeLastRemoves the last portion of strings, numbers, arrays, or objects. Supports amount option.
uniqIdGenerates a unique identifier using random base-36 strings.
uuidGenerates a RFC4122 version 4 UUID.
concatPathConcatenates and normalizes path segments, removing duplicate slashes.
removeNonNumbersRemoves all non-numeric characters from a string.
twConcatenates and deduplicates Tailwind CSS class names. Supports strings, arrays, numbers, nulls, and undefined values.
keyValuesExtracts values from a list of objects based on a key. Can remove duplicates.
removeDuplicatesRemoves 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