Security News
New Proposed CISA Mandate Would Require Critical Infrastructure to Report Ransom Payments Within 24 Hours
CISA has proposed a set of new rules that would require critical infrastructure to report cyber incidents and ransom payments.
mdn-data
Advanced tools
Open Web data by the Mozilla Developer Network
Weekly downloads
Package description
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.
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);"}
Provides browser support data for web technologies from Can I Use. While mdn-data offers structured documentation data, caniuse-api focuses on compatibility and browser support, making it complementary for web development insights.
This package provides machine-readable versions of web standards. Similar to mdn-data, it includes CSS, HTML, and other web technologies. The difference lies in the source and scope of the data, with webref pulling from W3C specifications and WHATWG.
Readme
Note: We are in the process of deprecating the
mdn/data
package in favor ofw3c/webref
. If this could present a problem to your project, please contact us via our GitHub discussions. Thank you.
Maintained by the MDN team at Mozilla.
This repository contains general data for Web technologies.
This data is used in MDN documentation, to build information boxes or sidebar navigation. External tools have started to make use of this data as well. For example, the CSSTree CSS parser.
There's a top-level directory for each broad area covered: for example, api
and css
. Inside each of these directories is one or more
JSON files containing the data.
Contains data about Web APIs:
Contains data about:
Read more about CSS data and the format of the files.
The l10n folder contains localization strings that are used in the various json files throughout this repository.
If you find a problem, please file an issue.
We're very happy to accept contributions to this data. Please familiarize yourself with the schema for the data you're editing, and send us a pull request. See also the Contributing file for more information.
FAQs
Open Web data by the Mozilla Developer Network
The npm package mdn-data receives a total of 22,329,623 weekly downloads. As such, mdn-data popularity was classified as popular.
We found that mdn-data demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 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
CISA has proposed a set of new rules that would require critical infrastructure to report cyber incidents and ransom payments.
Security News
Redis is no longer OSS, breaking its explicit commitment to remain under the BSD 3-Clause License forever. This has angered contributors who are now working to fork the software.
Product
Socket AI now enables 'AI detected potential malware' alerts by default, ensuring users benefit from AI-powered state-of-the-art malware detection without needing to opt-in.