Caches data from the Mozilla Developer Network wiki and provides methods to return links to documentation for JavaScript and DOM objects.
npm install mdn-linksInstall:
npm install mdn-linker
Require:
const mdn = require('mdn-links');
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() method: mdn.update(function () {
console.log(mdn.getLink('Array', 'isArray'));
console.log(mdn.getLink('Array', 'prototype.forEach'));
});
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.