
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
iana-media-type
Advanced tools
iana-media-type
With iana-media-type
, you can use IANA media types as JSON in your projects. It works in modern JavaScript runtimes.
We've provided a simple API for you. You can obtain iana-media-type
from NPM. Please see the section "How to Obtain".
iana-media-type
provides an NPM package. You can install it with your favorite package managers, and then bundle it into your project.Package Manager | Command | Shorthand |
---|---|---|
bun | bun install iana-media-type | bun i iana-media-type |
npm | npm install iana-media-type | npm i iana-media-type |
pnpm | pnpm install iana-media-type | pnpm i iana-media-type |
yarn | yarn add iana-media-type | yarn add iana-media-type |
iana-media-type
provides a JSON file on the GitHub. You can download it and use it in your project.curl -fsSL -o iana-media-type.json https://raw.githubusercontent.com/AsherJingkongChen/iana-media-type/main/index.json
import mediaTypes from 'iana-media-type/index.js';
console.log({ mediaTypes, length: mediaTypes.length });
(Obtained from NPM)
on node v19:import mediaTypes from 'iana-media-type' assert { type: 'json' };
console.log({ mediaTypes, length: mediaTypes.length });
(Obtained from NPM)
on node 20+:import mediaTypes from 'iana-media-type' with { type: 'json' };
console.log({ mediaTypes, length: mediaTypes.length });
(Obtained from GitHub)
in the browser or deno:import mediaTypes from 'https://raw.githubusercontent.com/AsherJingkongChen/iana-media-type/main/index.json' with { type: 'json' };
console.log({ mediaTypes, length: mediaTypes.length });
Note: THIS section is for contributors and developers only
Package Manager | Command | Script | Description |
---|---|---|---|
bun / npm / pnpm | install | Install dependencies | |
bun / npm / pnpm | run | build | Build the JSON manifest |
bun / npm / pnpm | run | format | Format files using Prettier |
You may encounter some problems during development and deployment.
Please read the following notes carefully.
FAQs
Collect IANA media types for you
We found that iana-media-type demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.