Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mdn-links

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mdn-links

Caches data from the Mozilla Developer Network wiki and provides methods to return links to documentation for JavaScript and DOM objects.

  • 0.1.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

MDN Links is a utility package for generating links to Mozilla Developer Network documentation pages. It's primary use is for generating links for YUIDoc to use for native classes and methods. Currently, only links to the Web API Reference and JavaScript Global Objects pages are supported.

Usage

Install:

npm install mdn-linker

Require:

const mdn = require('mdn-links');

Simply pass the name of the global object and, optionally, one of its members to the getLink() method:

mdn.getLink('Array');
//-> 'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array'

mdn.getLink('Blob', 'slice');
//-> 'https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice'

Update cache

A cached set of links is included in the package, but if these become stale they can be updated with the update() method:

mdn.update(function () {
    console.log(mdn.getLink('Array', 'isArray'));
    console.log(mdn.getLink('Array', 'prototype.forEach'));
}); 

License

Copyright (c) 2015 Andy Earnshaw

This software is licensed under the MIT license. See the LICENSE.txt file accompanying this software for terms of use.

Keywords

FAQs

Package last updated on 01 Jul 2015

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