
Research
/Security News
TensorLake npm SDK Compromised in ChainDrop Shai-Hulud Credential-Stealing Attack
Tensorlake npm SDK version 0.5.144 was compromised in a ChainDrop / Shai-Hulud attack, delivering credential-stealing malware.
@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 25 hand-optimized isomorphic modules — strings, arrays, objects, math, numbers, async, crypto, validation, dates, color conv
An ultra-lightweight, high-performance, and fully tree-shakeable modern JavaScript/TypeScript utility library. Built with TypeScript, side-effects free, bundled into both ESM and CommonJS formats, and thoroughly unit tested.
import) and CommonJS (require).npm install @dev_x_mohit/opti-kit
import { isNil, isObject, isDate } from '@dev_x_mohit/opti-kit';
isNil(null); // true
isObject({ a: 1 }); // true
isObject([]); // false (arrays are excluded)
isDate(new Date()); // true
import { camelCase, kebabCase, snakeCase, escapeHtml } from '@dev_x_mohit/opti-kit';
camelCase('hello-world'); // 'helloWorld'
kebabCase('helloWorld'); // 'hello-world'
snakeCase('helloWorld'); // 'hello_world'
escapeHtml('<script>'); // '<script>'
import { chunk, unique, groupBy, intersection } from '@dev_x_mohit/opti-kit';
chunk([1, 2, 3, 4], 2); // [[1, 2], [3, 4]]
unique([1, 2, 2, 3]); // [1, 2, 3]
intersection([1, 2], [2, 3]); // [2]
groupBy([{g: 'A'}, {g: 'B'}], i => i.g); // { A: [...], B: [...] }
import { pick, omit, get, deepClone, deepMerge } from '@dev_x_mohit/opti-kit';
const obj = { a: { b: 42 }, c: 3 };
get(obj, 'a.b'); // 42
pick(obj, ['c']); // { c: 3 }
omit(obj, ['c']); // { a: { b: 42 } }
const clone = deepClone(obj); // Fully deep-copied object
import { clamp, lerp, round, mean } from '@dev_x_mohit/opti-kit';
clamp(15, 1, 10); // 10 (clamped to max)
lerp(10, 20, 0.5); // 15 (linear interpolation)
round(1.2345, 2); // 1.23
mean([1, 2, 3, 4]); // 2.5
import { delay, once, retry } from '@dev_x_mohit/opti-kit';
await delay(1000); // sleep for 1 second
const init = once(() => console.log('Run only once!'));
init(); // Logs 'Run only once!'
init(); // Does nothing
// Retries async function up to 3 times, with a 500ms delay between failures
const data = await retry(fetchData, 3, 500);
import { isLeapYear, relativeTime } from '@dev_x_mohit/opti-kit';
isLeapYear(2024); // true
relativeTime(new Date(Date.now() - 60000)); // "a minute ago"
import { hexToRgb, rgbToHex } from '@dev_x_mohit/opti-kit';
hexToRgb('#0080ff'); // { r: 0, g: 128, b: 255 }
rgbToHex(255, 0, 100); // '#ff0064'
import { isEmail, isUrl, isUuid } from '@dev_x_mohit/opti-kit';
isEmail('test@domain.com'); // true
isUrl('https://google.com'); // true
isUuid('123e4567-e89b-12d3-a456-426614174000'); // true
import { copyToClipboard, getQueryParams } from '@dev_x_mohit/opti-kit';
// Safely writes text to clipboard in client context (returns boolean success)
await copyToClipboard('Hello Clipboard!');
// Resolves search queries isomorphic or explicitly
getQueryParams('http://domain.com?user=mohit'); // { user: 'mohit' }
import { uuid, fnv1a } from '@dev_x_mohit/opti-kit';
uuid(); // '4e12ff48-356b-4e16-bb4d-6bc0bf3a8f56'
fnv1a('hello world'); // 358245367 (unsigned 32-bit FNV hash value)
import { safeStorage } from '@dev_x_mohit/opti-kit';
// Works isomorphic (no crashing during Next.js SSR), serializes objects natively,
// and supports custom expiration times in milliseconds!
safeStorage.setItem('session', { active: true }, 60000); // expires in 1 min
safeStorage.getItem('session'); // { active: true }
import { EventEmitter } from '@dev_x_mohit/opti-kit';
const emitter = new EventEmitter();
emitter.on('login', (user) => console.log('Welcome back', user));
emitter.emit('login', 'Mohit'); // Logs "Welcome back Mohit"
npm install
npm run test
npm run build
npm login
# For standard package:
npm publish
# For scoped package:
npm publish --access public
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 29 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.

Research
/Security News
Tensorlake npm SDK version 0.5.144 was compromised in a ChainDrop / Shai-Hulud attack, delivering credential-stealing malware.

Research
/Security News
Socket found 16 malicious Firefox extensions designed to steal crypto wallet recovery phrases and private keys using cloned Rabby and OKX interfaces.

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