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

array-kit-lite

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

array-kit-lite

Lightweight array utilities (isEmpty, isNotEmpty, etc.)

latest
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

📦 array-kit# 📦 array-kit

A lightweight utility library for common array operations like isEmpty, isNotEmpty, first, last, and unique.
Designed to be minimal, typed, and framework-agnostic — a tiny alternative to Lodash for array checks.

🚀 Installation

npm

npm install array-kit

pnpm

pnpm add array-kit

yarn

yarn add array-kit

bun

bun add array-kit

JSR (Deno / Modern Node)

deno add jsr:@your-username/array-kit

✨ Features

✅ TypeScript support out of the box ✅ Works in Node.js, Deno, and modern browsers ✅ Tiny footprint — only the essentials ✅ Tree-shakeable

Usage

// ESM / TypeScript
import { isEmpty, isNotEmpty, first, last, unique } from "array-kit";

// CommonJS
const { isEmpty, isNotEmpty } = require("array-kit");

Example

isEmpty([]); // true
isNotEmpty([1, 2, 3]); // true

first([10, 20, 30]); // 10
last([10, 20, 30]); // 30

unique([1, 1, 2, 3, 3]); // [1, 2, 3]

API

FunctionDescription
isEmpty(arr)Returns true if the array is null, undefined, or empty
isNotEmpty(arr)Returns true if the array contains at least one element
first(arr)Returns the first element, or undefined if empty
last(arr)Returns the last element, or undefined if empty
unique(arr)Returns a new array with duplicates removed

Keywords

array

FAQs

Package last updated on 29 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts