New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@utilify/array

Package Overview
Dependencies
Maintainers
0
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@utilify/array - npm Package Compare versions

Comparing version
1.0.2
to
1.0.3
+1
-1
package.json
{
"name": "@utilify/array",
"version": "1.0.2",
"version": "1.0.3",
"description": "A collection of utility functions for array manipulation and transformation. Simplifies common operations like chunking, flattening, shuffling, finding differences, and more.",

@@ -5,0 +5,0 @@ "keywords": [

+24
-32

@@ -1,11 +0,9 @@

# Utilitários Array
# Array Utilities
As **funções utilitárias para arrays** fornecem uma variedade de métodos para manipular e transformar arrays. Elas ajudam a simplificar operações comuns, como dividir, achatar, embaralhar e encontrar diferenças entre arrays, entre outras.
**Array utility functions** provide a variety of methods for manipulating and transforming arrays. They help simplify common operations, such as splitting, flattening, shuffling, and finding differences between arrays, among others.
## Instalação
## Installation
Para instalar as funções utilitárias para arrays, use um dos seguintes comandos, dependendo do seu gerenciador de pacotes:
To install the array utility functions, use one of the following commands, depending on your package manager:
::: code-group
```bash [npm]

@@ -23,12 +21,8 @@ npm install @utilify/array

:::
Once installed, you can import the functions into your project, using either ESM or CJS.
Após a instalação, você pode importar as funções no seu projeto, utilizando ESM ou CJS.
## Usage
## Uso
This library supports both the ESM and CJS module systems.
Esta biblioteca suporta tanto o sistema de módulos ESM quanto CJS. Use o método de importação que corresponda à configuração do seu projeto.
::: code-group
```typescript [esm]

@@ -42,8 +36,6 @@ import { shuffle } from '@utilify/array';

:::
## Overview
## Visão Geral
Here’s an overview of the functions available in the array utility package:
Aqui está uma visão geral das funções disponíveis no pacote de utilitários para arrays:
### [after](./after.md)

@@ -53,3 +45,3 @@ ```typescript

```
Retorna os elementos do array após o índice `n`.
Returns the elements of the array after the index `n`.

@@ -60,3 +52,3 @@ ### [before](./before.md)

```
Retorna os elementos do array antes do índice `n`.
Returns the elements of the array before the index `n`.

@@ -67,3 +59,3 @@ ### [chunk](./chunk.md)

```
Divide o array em pedaços menores de tamanho `size`.
Divides the array into smaller chunks of size `size`.

@@ -74,3 +66,3 @@ ### [difference](./difference.md)

```
Retorna os elementos do array que não estão presentes no segundo array.
Returns the elements of the array that are not present in the second array.

@@ -81,3 +73,3 @@ ### [first](./first.md)

```
Retorna os primeiros `n` elementos do array.
Returns the first `n` elements of the array.

@@ -88,3 +80,3 @@ ### [flattenArr](./flattenArr.md)

```
Achata o array até a profundidade especificada.
Flattens the array to the specified depth.

@@ -95,3 +87,3 @@ ### [getRandom](./getRandom.md)

```
Retorna um elemento aleatório do array.
Returns a random element from the array.

@@ -102,3 +94,3 @@ ### [isIterable](./isIterable.md)

```
Verifica se o objeto é iterável.
Checks if the object is iterable.

@@ -109,3 +101,3 @@ ### [last](./last.md)

```
Retorna os últimos `n` elementos do array.
Returns the last `n` elements of the array.

@@ -116,3 +108,3 @@ ### [rotate](./rotate.md)

```
Rotaciona os elementos do array `n` posições.
Rotates the elements of the array by `n` positions.

@@ -123,3 +115,3 @@ ### [sanitizeArr](./sanitizeArr.md)

```
Remove ou substitui os valores especificados no array.
Removes or replaces specified values in the array.

@@ -130,3 +122,3 @@ ### [shuffle](./shuffle.md)

```
Embaralha os elementos do array.
Shuffles the elements of the array.

@@ -137,3 +129,3 @@ ### [swap](./swap.md)

```
Troca os elementos nas posições `index1` e `index2`.
Swaps the elements at positions `index1` and `index2`.

@@ -144,3 +136,3 @@ ### [union](./union.md)

```
Retorna a união de múltiplos arrays.
Returns the union of multiple arrays.

@@ -151,2 +143,2 @@ ### [unique](./unique.md)

```
Retorna um array com elementos únicos.
Returns an array with unique elements.