Skip to content

SocketDev/socket-lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,246 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

@socketsecurity/lib

Socket Badge CI Coverage

Follow @SocketSecurity Follow @socket.dev on Bluesky

Core utilities for Socket.dev tools: file system, processes, HTTP, env detection, logging, spinners, and more. Tree-shakeable, TypeScript-first, cross-platform.

Install

pnpm add @socketsecurity/lib

Quick Start

import { Spinner } from '@socketsecurity/lib/spinner'
import { readJson } from '@socketsecurity/lib/fs'

const spinner = Spinner({ text: 'Loading…' })
spinner.start()
const pkg = await readJson('./package.json')
spinner.successAndStop(`Loaded ${pkg.name}@${pkg.version}`)

Every export lives under a subpath — pick what you need:

import { spawn } from '@socketsecurity/lib/spawn'
import { httpJson } from '@socketsecurity/lib/http-request'
import { safeDelete } from '@socketsecurity/lib/fs'

Documentation

Start with the API Index — every subpath export with a one-line description.

Development

pnpm install          # install
pnpm build            # build
pnpm test             # run tests
pnpm run cover        # tests with coverage
pnpm dev              # watch mode
pnpm run lint         # check style
pnpm run fix          # auto-fix formatting

See CLAUDE.md for contributor guidelines.

License

MIT

About

Core library for Socket.dev tools

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages