Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
@filecoin-shipyard/use-filecoin-config
Advanced tools
React hook to load config via Filecoin API
React hook to load config via Filecoin API
Uses js-filecoin-api-client to connect to the go-filecoin HTTP API running on localhost.
Note: Even though it is a React hook, it was built to be used in command-line apps that run in a Node.js environment, it has not yet been used in the browser.
From filecoin-big-head which uses React with Ink in a Node.js interactive command-line app:
import useFilecoinConfig from '@filecoin-shipyard/use-filecoin-config'
const Main = () => {
const [nickError, nickname] = useFilecoinConfig('heartbeat.nickname')
return <Box>{nickname && nickname}</Box>
}
useFilecoinConfig(key, [options])
Name | Type | Description |
---|---|---|
key | String | Dot separated key to config value to retrieve |
options | Object | Optional options |
options.interval | Number | Requery the config value every interval milliseconds (Default: 1000) |
Returns an array of values, like other React hooks.
Index | Type | Description |
---|---|---|
0 | Error | Error object or null |
1 | ? | Value from config |
MIT/Apache-2 (Permissive License Stack)
FAQs
React hook to load config via Filecoin API
The npm package @filecoin-shipyard/use-filecoin-config receives a total of 0 weekly downloads. As such, @filecoin-shipyard/use-filecoin-config popularity was classified as not popular.
We found that @filecoin-shipyard/use-filecoin-config demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 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.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.