
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@socketsecurity/lib
Advanced tools
Core utilities, constants, and helper functions for Socket.dev security tools.
pnpm install @socketsecurity/lib
Import Node.js and package manager constants:
import {
NODE_MODULES,
PACKAGE_JSON,
PNPM_LOCK_YAML,
NPM_REGISTRY_URL,
} from '@socketsecurity/lib/constants/packages'
Access typed environment variables:
import { getEnv } from '@socketsecurity/lib/env/getters'
import { NODE_ENV } from '@socketsecurity/lib/env/node-env'
const env = getEnv('NODE_ENV')
console.log(NODE_ENV) // 'production' | 'development' | 'test'
For a complete list of available modules, see the package.json exports.
All types are exported for TypeScript projects:
import type {
PackageJson,
TsConfig,
LockFile,
} from '@socketsecurity/lib/types'
Access utility modules for common operations:
// File system utilities
import { readJsonFile, writeJsonFile } from '@socketsecurity/lib/fs'
// Package utilities
import { parsePackageSpec } from '@socketsecurity/lib/packages'
// Path utilities
import { normalizePath } from '@socketsecurity/lib/paths'
// And many more...
See the exports map for all available utility modules.
MIT
FAQs
Core utilities and infrastructure for Socket.dev security tools
We found that @socketsecurity/lib demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.