
Product
Introducing Socket Scanning for VS Code Marketplace Extensions
Socket now scans VS Code extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.
@dev_x_mohit/opti-kit
Advanced tools
OptiKit is a zero-dependency, ultra-lightweight, and fully tree-shakeable JavaScript/TypeScript utility monorepo library. It ships 37 hand-optimized isomorphic modules. Every function is side-effect free, individually importable, and ships with full TypeS
The Zero-Dependency, Ultra-Lightweight Utility Engine for Modern JavaScript & TypeScript.
OptiKit is a modern, zero-dependency utility engine designed as a drop-in replacement for legacy, monolithic libraries like Lodash, Rambda, and Moment. Natively built in TypeScript, it packages 67 hand-optimized modules containing 680+ utility functions.
Every export is designed with standard ESM + CJS compatibility, full TypeScript declarations, side-effects-free tree-shaking, and 100% passing test coverage.
"sideEffects": false so your bundle only includes the functions you actually import.Install the package via your preferred package manager:
# npm
npm install @dev_x_mohit/opti-kit
# pnpm
pnpm add @dev_x_mohit/opti-kit
# yarn
yarn add @dev_x_mohit/opti-kit
# bun
bun add @dev_x_mohit/opti-kit
Rather than dumping a monolithic API, OptiKit organizes its 680+ utilities into dedicated, clean domains:
string (45 utils) — Modern string manipulations: slugify, truncate, escapeHtml, titleCase.array (40 utils) — Safe list processing: chunk, unique, groupBy, partition, intersection.object (31 utils) — Deep manipulations: deepClone, deepMerge, flattenObject, pick, omit.collection (12 utils) — Aggregations: countBy, keyBy, sortBy, symmetricDifference.set & map (15 utils) — Advanced Set operations and Map utilities.tree (10 utils) — Hierarchical traversals: arrayToTree, treeToArray, search, mapping.json (6 utils) — Deep JSON operations: jsonClone, jsonFlatten, jsonUnflatten, jsonPath, jsonMerge, jsonDiff.csv (5 utils) — Micro CSV parsers: csvParse, csvToJson, jsonToCsv.ds (4 classes) — Optimized structures: Stack, Queue, PriorityQueue, BiMap.deep (8 utils) — Deep freezing, mapping keys, flattening, omission.async (19 utils) — Concurrency control: debounce, throttle, retry, delay, asyncPool, timeout.functional (14 utils) — FP primitives: curry, partial, pipe, compose, onceFn.events (7 utils) — Pub/Sub emitter: EventEmitter, listen, listenOnce, delegateEvent.store (4 utils) — Micro reactive signals: signal, computed, effect, createStore.cache (2 utils) — TTL caching: LRUCache, memoizeWithTTL.guard (12 utils) — Safe parse boundaries: safeJsonParse, safeParseInt, invariant, attempt.crypto (10 utils) — Cryptographic utilities: uuid, sha256, sha512, hmacSha256, generateToken.encoding (8 utils) — Fast converters: utf8Encode, utf8Decode, hexEncode, base64Encode.hash (10 utils) — Hashing algorithms (CRC32, DJB2, Base64 encode/decode).validate (28 utils) — Robust format checks: isEmail, isUrl, isUuid, isCreditCard, isJWT.semver (5 utils) — SemVer parser/validator: semverCompare, semverSatisfies.regex (1 obj) — Pre-compiled patterns.dom (14 utils) — Browser interaction: copyToClipboard, setCookie, getCookie, createElement.storage (1 obj) — SSR-safe storage: safeStorage (LocalStorage/SessionStorage with JSON + expiry).browser (16 utils) — Environment checks: isBrowser, isChrome, isMobile, isTouchDevice.keyboard (2 utils) — Hotkey event handlers: registerShortcut, isKeyPressed.url (8 utils) — Safe URL parser & builder: joinPaths, parseUrl, buildUrl.math (32 utils) — Math operations: clamp, lerp, mean, median, factorial, isPrime, gcd.statistics (12 utils) — Data science math: variance, standardDeviation, covariance, correlation.ml (12 utils) — Machine Learning basics: sigmoid, relu, minMaxScaler, cosineSimilarity.nlp (10 utils) — Natural Language Processing: tokenizeWords, soundex, levenshteinDistance.finance (10 utils) — Financial logic: calculatePMT, compoundInterest, NPV, ROI.geometry (15 utils) — Coord geometry: distance2D, midpoint, rotatePoint, circleArea.units (8 utils) — Converter helper: celsiusToFahrenheit, milesToKilometers.color (18 utils) — Color convert & contrasts: hexToRgb, rgbToHex, generateHexComplementary, A11y.types (16 utils) — Precise runtime check: isNil, isObject, isPromise, isDate.format (9 utils) — Format helpers: formatDuration, formatPhoneNumber, pluralize.schema (12 utils) — Simple rule runner: validateObject, required, minLength.date (20 utils) — Iso-time: relativeTime, formatDate, diffInDays, addDays.template (2 utils) — Simple template engine: render, compile.log (2 utils) — Colored ANSI logger: createLogger, ansi.store)Create ultra-lightweight reactive states in just 4 lines of code:
import { signal, computed, effect } from '@dev_x_mohit/opti-kit';
const count = signal(0);
const doubleCount = computed(() => count.value * 2);
effect(() => console.log(`Count is: ${count.value}, Double is: ${doubleCount.value}`));
// Log: Count is: 0, Double is: 0
count.value = 5;
// Log: Count is: 5, Double is: 10
storage)Work with storage in Next.js / SSR environments without window checks or throwing errors:
import { safeStorage } from '@dev_x_mohit/opti-kit';
// Saves with native JSON serialization and an optional 1-minute expiration timer
safeStorage.setItem('session', { userId: 'usr_88', role: 'editor' }, 60000);
// Safely retrieves and parses the object; returns null if expired or missing
const session = safeStorage.getItem('session');
async)Limit concurrency when executing large batches of async tasks:
import { asyncPool } from '@dev_x_mohit/opti-kit';
const urls = ['/api/1', '/api/2', '/api/3', '/api/4'];
const fetchTask = async (url: string) => fetch(url).then(r => r.json());
// Executes fetch tasks, processing a maximum of 2 requests concurrently
const results = await asyncPool(2, urls, fetchTask);
object)import { deepMerge, flattenObject } from '@dev_x_mohit/opti-kit';
const merged = deepMerge({ a: { b: 1 } }, { a: { c: 2 } });
// { a: { b: 1, c: 2 } }
const flat = flattenObject({ user: { address: { city: 'NYC' } } });
// { 'user.address.city': 'NYC' }
MIT © Mohit Lakhara
FAQs
OptiKit is a zero-dependency, ultra-lightweight, and fully tree-shakeable JavaScript/TypeScript utility monorepo library. It ships 37 hand-optimized isomorphic modules. Every function is side-effect free, individually importable, and ships with full TypeS
The npm package @dev_x_mohit/opti-kit receives a total of 33 weekly downloads. As such, @dev_x_mohit/opti-kit popularity was classified as not popular.
We found that @dev_x_mohit/opti-kit demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Product
Socket now scans VS Code extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.

Research
/Security News
Socket uncovered two malicious VS Code themes in a GlassWorm-linked cluster with thousands of installs across VS Code Marketplace and Open VSX.

Security News
/Company News
Capital One is partnering with Socket to proactively secure its open source supply chain.