Simple JavaScript kit for common utils!
Find a file
Domenico Tenace 409f515864
feat: restart entire project (#3)
* chore: first setup draft

* feat: isArray utility ok

* chore: change ts config

* feat: isBlankArray utility is ok

* feat: isEmptyString utility ok

* feat: isNull utility is ok

* chore: add AGENTS.md and copilot-instructions.md

* feat: isDefined utility is ok

* chore: add notations

* feat: add `pick`, `chunk`, and `capitalize` utilities and improve existing test descriptions.

* docs: add first setup of documentation (Vitepress)

* docs: setup style of documentation

* docs: rework documentation structure by adding dedicated API and guide pages, and update navigation and homepage content accordingly.

* docs: remove orama

* feat: Implement `isBoolean`, `isFunction`, `isNumber`, and `isString` type-checking utilities with tests, and update gitignore.

* docs: add documentation for `isString`, `isNumber`, `isBoolean`, and `isFunction`, update `isString` type signature, and remove unused Vitepress import.

* feat: add `isTrue` and `isTrueFormat` utilities with tests and update tsconfig to include DOM types.

* refactor: make `isEmptyString` generic with type checking and add JSDoc to `isTrueFormat`.

* feat: Add `intersection`, `partition`, `groupBy`, and `uniq` array utilities with tests, and update `chunk` input validation.

* feat: add initial `check`, `object`, and `string` utility modules and a build script.

* feat: Introduce new string, object, and check utilities with tests and documentation, and enhance string capitalization.

* feat: add string, object, and check utilities including their tests and exports.

* refactor: change name of unused parameter

* chore: setup for build

* chore: add README and CONTRIBUTING
2026-01-06 18:42:25 +01:00
.agent/rules feat: restart entire project (#3) 2026-01-06 18:42:25 +01:00
.github feat: restart entire project (#3) 2026-01-06 18:42:25 +01:00
docs feat: restart entire project (#3) 2026-01-06 18:42:25 +01:00
src feat: restart entire project (#3) 2026-01-06 18:42:25 +01:00
.gitignore feat: restart entire project (#3) 2026-01-06 18:42:25 +01:00
CONTRIBUTING.md feat: restart entire project (#3) 2026-01-06 18:42:25 +01:00
LICENSE feat: restart entire project (#3) 2026-01-06 18:42:25 +01:00
package.json feat: restart entire project (#3) 2026-01-06 18:42:25 +01:00
README.md feat: restart entire project (#3) 2026-01-06 18:42:25 +01:00
tsconfig.json feat: restart entire project (#3) 2026-01-06 18:42:25 +01:00
vite.config.ts feat: restart entire project (#3) 2026-01-06 18:42:25 +01:00
yarn.lock feat: restart entire project (#3) 2026-01-06 18:42:25 +01:00

Easy Kit Utils

npm version license

Easy Kit Utils is a lightweight, comprehensive collection of JavaScript/TypeScript utility functions designed to simplify common programming tasks. It provides a set of helpers for array manipulation, type checking, object operations, and string formatting, fully typed with TypeScript.

Features

  • 🚀 Lightweight & Tree-shakable: Import only what you need.
  • 💪 TypeScript Support: Written in TypeScript with full type definitions.
  • 🛡️ Reliable: Comprehensive test suite ensures stability.
  • 📦 Zero Dependencies: Pure utility functions with no external runtime dependencies.

Installation

Install the package via npm, yarn, or pnpm:

npm install easy-kit-utils
# or
yarn add easy-kit-utils
# or
pnpm add easy-kit-utils

Usage

You can import specific functions from the main package:

import { chunk, isString, merge, capitalize } from "easy-kit-utils";

// Array Example
const array = [1, 2, 3, 4, 5];
console.log(chunk(array, 2)); // [[1, 2], [3, 4], [5]]

// Check Example
console.log(isString("hello")); // true

// Object Example
const obj1 = { a: 1 };
const obj2 = { b: 2 };
console.log(merge(obj1, obj2)); // { a: 1, b: 2 }

// String Example
console.log(capitalize("hello world")); // "Hello world"

API Reference

🛠️ Array Utilities

Helpers for working with arrays.

  • chunk: Splits an array into chunks of a specified size.
  • groupBy: Groups array elements based on a criterion.
  • intersection: Creates an array of unique values that are included in all given arrays.
  • partition: Splits an array into two groups based on a predicate.
  • uniq: Creates a duplicate-free version of an array.

Check Utilities

Type guards and validation helpers.

  • isArray: Checks if value is an array.
  • isBlankArray: Checks if an array is empty or contains only null/undefined values.
  • isBoolean: Checks if value is a boolean.
  • isDefined: Checks if value is defined (not null or undefined).
  • isEmptyString: Checks if a string is empty.
  • isFunction: Checks if value is a function.
  • isNull: Checks if value is null.
  • isNumber: Checks if value is a number.
  • isObject: Checks if value is an object.
  • isPromise: Checks if value is a promise.
  • isString: Checks if value is a string.
  • isTrue: Checks if value is explicitly true.
  • isTrueFormat: Validates if a string matches a specific format (e.g. email, phone).

📦 Object Utilities

Helpers for object manipulation.

  • deepClone: Creates a deep clone of an object.
  • get: Retrieves a value from a nested object path safely.
  • merge: Deeply merges two objects.
  • omit: Creates an object composed of the own and inherited enumerable property paths of object that are not omitted.
  • pick: Creates an object composed of the picked object properties.

📝 String Utilities

Helpers for string manipulation.

  • camelCase: Converts a string to camelCase.
  • capitalize: Capitalizes the first character of a string.
  • kebabCase: Converts a string to kebab-case.
  • snakeCase: Converts a string to snake_case.
  • truncate: Truncates a string if it's longer than the given maximum string length.

Contributing

All instructions can be found in the CONTRIBUTING.md file.

Support

If you like this project, you can support me with a very small donation.
I would be grateful 🥹

Buy Me A Coffee