Your quick key to clean, reusable JavaScript.
quickeyjs is a lightweight JavaScript utility library that helps you write cleaner and faster code. It provides simple, dependency-free helper functions for everyday tasks — from strings and arrays to numbers and objects.
Using npm:
npm install quickeyjsAs ES module:
import * as qk from 'quickeyjs';
console.log(qk.capitalize('hello'));
console.log(qk.unique([1,1,2,3]));capitalize(str)→ Capitalizes first letterreverse(str)→ Reverses stringtruncate(str, length)→ Shortens string and adds "..."
unique(arr)→ Removes duplicateschunk(arr, size)→ Splits into chunksflatten(arr)→ Flattens nested arrays
clamp(num, min, max)→ Clamps number within rangerandomInt(min, max)→ Returns random integeraverage(...nums)→ Returns mean value
merge(obj1, obj2)→ Deep merges objectsisEmpty(obj)→ Checks if object has no keysclone(obj)→ Deep clones an object
Run node src/index.js to see sample outputs for all helpers.
PS: This was entierly vibe coded, and i hate it.