Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
@kodadot1/minipfs
Advanced tools
A set of tools to work with IPFS URIs.
Install package:
# npm
npm install @kodadot1/minipfs
# yarn
yarn install @kodadot1/minipfs
# pnpm
pnpm install @kodadot1/minipfs
Import:
// ESM
import { $obtain } from '@kodadot1/minipfs'
// CommonJS
const { $obtain } = require('@kodadot1/minipfs')
toArweavePath
- Convert AR URI to Arweave HTTP URIisCID
- is URI CID?isHTTP
- is URI HTTP?isPath
- is URI IPFS path?toIPFSPath
- Convert IPFS something to IPFS pathisDefaultPinataProvider
- check if URI is default HTTPS Pinata gatewaycanBeIPFS
- check if URI can be IPFS path or IPFS CIDextractIPFS
- convert ipfs://
prefixed URI to IPFS pathIPFSProviders
- named list of IPFS gatewaysAvailableProviders
- IPFSProviders ArrayipfsProviders:
- Record of IPFSProviders and their URLsgetProviderList
- convert IPFSProviders Array to URL Array$obtain<T>
- put any URI and get back your T (Put your Metadata type here)$purify
- put any URI and get sanitized HTTP URIobtain:
- Wrapper around $fetch
from ofetch
obtainSafe
- Same as obtain
but returns empty object if errorobtainFast
- Same as obtain
but throws Error after 8 secondsobtainMedia
- use for fetching media filesobtainMimeType
- use for fetching mime type of filecompetition
- put IPFS path, provider list and get back fastest responsesanitize
- convert any URI into usable URI to fetchtypes
and constants
were exported as well, but omitted here.
corepack enable
(use npm i -g corepack
for Node.js < 16.10)pnpm install
pnpm dev
Made with 💖
Published under MIT License.
FAQs
A set of tools to work with IPFS URIs.
The npm package @kodadot1/minipfs receives a total of 37 weekly downloads. As such, @kodadot1/minipfs popularity was classified as not popular.
We found that @kodadot1/minipfs 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.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.