Socket
Socket
Sign inDemoInstall

mdn-data

Package Overview
Dependencies
Maintainers
7
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mdn-data

Open Web data by the Mozilla Developer Network


Version published
Weekly downloads
31M
increased by3.01%
Maintainers
7
Weekly downloads
 
Created

What is mdn-data?

The mdn-data npm package provides structured data from MDN Web Docs in a programmable format. It includes data on CSS, HTML, and JavaScript, among other web standards, making it a valuable resource for developers looking to integrate web standards documentation into their projects or tools.

What are mdn-data's main functionalities?

Accessing CSS property data

This feature allows you to access detailed information about CSS properties, such as the 'color' property. The data includes syntax, initial values, and more, useful for building CSS-related tools or documentation generators.

{"const mdnData = require('mdn-data'); console.log(mdnData.css.properties.color);"}

Retrieving HTML element information

With this feature, you can retrieve information about HTML elements, like the anchor ('a') element. This includes attributes, permitted content, and more, which can be used in HTML documentation tools or editors.

{"const mdnData = require('mdn-data'); console.log(mdnData.html.elements.a);"}

Getting JavaScript object data

This allows access to information on JavaScript built-in objects, such as 'Promise'. The data covers methods, properties, and usage, beneficial for creating JS documentation or educational tools.

{"const mdnData = require('mdn-data'); console.log(mdnData.javascript.builtins.Promise);"}

Other packages similar to mdn-data

Keywords

FAQs

Package last updated on 24 Apr 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc