@socketsecurity/lib


Core library for Socket.dev tools.
Install
pnpm add @socketsecurity/lib
Usage
import { Spinner } from '@socketsecurity/lib/spinner'
import { readJsonFile } from '@socketsecurity/lib/fs'
import { NODE_MODULES } from '@socketsecurity/lib/constants/packages'
const spinner = Spinner({ text: 'Loading...' })
spinner.start()
const pkg = await readJsonFile('./package.json')
spinner.stop()
What's Inside
- Visual Effects → logger, spinner, themes
- File System → fs, globs, paths
- Package Management → dlx, npm, pnpm, yarn
- Process & Spawn → process spawning
- Environment → env getters
- Constants → node, npm, platform
- Utilities → arrays, objects, promises, strings
Development
pnpm install
pnpm build
pnpm test
pnpm dev
License
MIT