Socket
Socket
Sign inDemoInstall

mdn-data

Package Overview
Dependencies
0
Maintainers
7
Versions
58
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    mdn-data

Open Web data by the Mozilla Developer Network


Version published
Maintainers
7
Install size
617 kB
Created

Package description

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

Changelog

Source

2.5.0 (2024-04-08)

Features

  • css: text-wrap-mode + text-wrap-style (2e681ff)

Bug Fixes

  • lint: upgrade actions/{checkout,setup-node} to v4 + use node-version-file (b62c9ee)
  • package-lock: run npm install (#725) (dfad8d6)

Enhancements

  • publish-release: inline workflow action + allow manual execution (#724) (063fc20)

Miscellaneous

  • css: update appliesTo for align-content (603c07a)

Readme

Source

Welcome to MDN data

Note We are in the process of deprecating the mdn/data package in favor of w3c/webref. If you depend on this project, let us know in our community GitHub discussions. Thank you.

NPM version lint

This repository contains general data for Web technologies and is maintained by the MDN team at Mozilla.

Repository contents

The data in this repository is used in MDN Web Docs to build information boxes and sidebar navigation. External tools 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.

api

Contains data about Web APIs:

  • API inheritance (interface inheritance and mixin implementations)

css

Contains data about:

  • CSS at-rules
  • CSS functions
  • CSS properties
  • CSS selectors
  • CSS syntaxes
  • CSS types
  • CSS units

For more information, see the CSS data documentation and the Updating CSS JSON DB guide.

l10n

The l10n folder contains localization strings that are used in the various json files throughout this repository.

Problems?

If you find a problem, please file an issue.

Contributing

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 the CONTRIBUTING.md document for more information.

See also

Keywords

FAQs

Last updated on 08 Apr 2024

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc