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

devtools-config

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

devtools-config - npm Package Compare versions

Comparing version 0.0.12 to 0.0.13

2

package.json
{
"name": "devtools-config",
"version": "0.0.12",
"version": "0.0.13",
"description": "Devtools Local Configuration System",

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

## Configuration
[![Npm version](https://img.shields.io/npm/v/devtools-config.svg)](https://npmjs.org/package/devtools-config)
All default config values are in [`config/development.json`](./development.json), to override these values you need to [create a local config file](#create-a-local-config-file).

@@ -4,0 +6,0 @@

@@ -23,9 +23,16 @@ const pick = require("lodash/get");

function isEnabled(key) {
return config.features &&
typeof config.features[key] == "object" ?
config.features[key].enabled :
config.features[key];
return config.features && typeof config.features[key] == "object"
? config.features[key].enabled
: config.features[key];
}
function isDevelopment() {
if (typeof window == "object") {
if (process.env.NODE_ENV === "production") {
return true;
}
const href = window.location ? window.location.href : "";
return href.match(/^file:/) || href.match(/localhost:/);
}
if (isFirefoxPanel()) {

@@ -64,9 +71,5 @@ // Default to production if compiling for the Firefox panel

const localConfigPath = path.resolve(relativePath, "../configs/local.json");
try {
const output = JSON.stringify(config, null, 2);
fs.writeFileSync(localConfigPath, output);
return output;
} catch (err) {
return "{}";
}
const output = JSON.stringify(config, null, 2);
fs.writeFileSync(localConfigPath, output, { flag: "w" });
return output;
}

@@ -85,3 +88,3 @@

setConfig,
updateLocalConfig
updateLocalConfig,
};
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