- Notifications
You must be signed in to change notification settings - Fork11
Socket SDK for JavaScript / TypeScript
License
NotificationsYou must be signed in to change notification settings
SocketDev/socket-sdk-js
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
JavaScript SDK forSocket.dev API.
pnpm add @socketsecurity/sdk
import{SocketSdk}from'@socketsecurity/sdk'constclient=newSocketSdk('your-api-key',{retries:3,// Retry failed requests up to 3 timesretryDelay:1000,// Start with 1s delay, exponential backofftimeout:30000,// 30 second timeout})// Check your quotaconstquota=awaitclient.getQuota()if(quota.success){console.log(`Available quota:${quota.data.quota} units`)}// Analyze a packageconstresult=awaitclient.getScoreByNpmPackage('express','4.18.0')if(result.success){console.log(`Security Score:${result.data.score}/100`)}// Batch analyze multiple packagesconstbatchResult=awaitclient.batchPackageFetch({components:[{purl:'pkg:npm/express@4.18.0'},{purl:'pkg:npm/react@18.0.0'}]})
| Guide | Description |
|---|---|
| Getting Started | Quick start for contributors (5 min setup) |
| API Reference | Complete API method documentation |
| Usage Examples | Real-world patterns and code samples |
| Quota Management | Cost tiers (0/10/100) and utilities |
| Testing Guide | Test helpers, fixtures, and patterns |
| Method Reference | Quick method selection guide |
Seeusage-examples.md for complete examples including:
- Package security analysis
- Batch operations
- Full scans with SBOM
- Policy management
- Quota planning
MIT
About
Socket SDK for JavaScript / TypeScript
Topics
Resources
License
Code of conduct
Contributing
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors15
Uh oh!
There was an error while loading.Please reload this page.