
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@dependabit/utils
Advanced tools
String and array utility functions for the monorepo.
pnpm add @dependabit/utils
import { capitalize, camelCase, kebabCase, truncate } from '@dependabit/utils/string';
capitalize('hello'); // 'Hello'
camelCase('hello-world'); // 'helloWorld'
kebabCase('HelloWorld'); // 'hello-world'
truncate('Hello World', 8); // 'Hello...'
import { unique, groupBy, flatten, chunk } from '@dependabit/utils/array';
unique([1, 2, 2, 3]); // [1, 2, 3]
groupBy([1, 2, 3], n => n % 2); // { 0: [2], 1: [1, 3] }
flatten([[1, [2, 3]]], 1); // [1, [2, 3]]
chunk([1, 2, 3, 4, 5], 2); // [[1, 2], [3, 4], [5]]
You can import specific modules:
// Import only string utilities
import { capitalize } from '@dependabit/utils/string';
// Import only array utilities
import { unique } from '@dependabit/utils/array';
// Import everything
import { capitalize, unique } from '@dependabit/utils';
capitalize(str: string): string - Capitalize first lettercamelCase(str: string): string - Convert to camelCasekebabCase(str: string): string - Convert to kebab-casetruncate(str: string, maxLength: number, suffix?: string): string - Truncate with suffixunique<T>(arr: T[]): T[] - Remove duplicatesgroupBy<T, K>(arr: T[], keyFn: (item: T) => K): Record<K, T[]> - Group by keyflatten<T>(arr: Array<T | T[]>, depth?: number): T[] - Flatten nested arrayschunk<T>(arr: T[], size: number): T[][] - Split into chunks# Run tests for this package
pnpm --filter @dependabit/utils test
# Watch mode
pnpm --filter @dependabit/utils test:watch
# Coverage
pnpm --filter @dependabit/utils test:coverage
All functions are optimized for:
MIT
FAQs
Utility functions for the monorepo
We found that @dependabit/utils 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.
Did you know?

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.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.