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

globals-docs

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

globals-docs - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

23

index.js

@@ -16,3 +16,22 @@ var docs = require('./globals-docs.json');

function buildLowerCased() {
var lowercased = {};
for (var k in docs) {
lowercased[k] = {};
for (var name in docs[k]) {
lowercased[k][name.toLowerCase()] = docs[k][name];
}
}
return lowercased;
}
var lowerCased = buildLowerCased();
/**
* Lowercased docs: the same as the original docs array, but with lowercased
* names.
*/
module.exports.lowerCased = lowerCased;
/**
* Get a URL for a global object.

@@ -27,8 +46,8 @@ *

module.exports.getDoc = function(name, env) {
if (!env) env = Object.keys(docs);
if (!env) env = Object.keys(lowerCased);
for (var i = 0; i < env.length; i++) {
var d = docs[env[i]][name];
var d = lowerCased[env[i]][name.toLowerCase()];
if (d) return d;
}
};

2

package.json
{
"name": "globals-docs",
"version": "2.0.0",
"version": "2.0.1",
"description": "documentation links for all node and browser globals",

@@ -5,0 +5,0 @@ "main": "index.js",

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