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

babel-plugin-transform-inline-environment-variables

Package Overview
Dependencies
Maintainers
5
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-inline-environment-variables - npm Package Compare versions

Comparing version 0.3.0-alpha.670b24ec to 0.3.0-alpha.6ae655c0

13

lib/index.js
"use strict";
module.exports = function (_ref) {
var t = _ref.types;
module.exports = function ({ types: t }) {
return {
name: "transform-inline-environment-variables",
visitor: {
MemberExpression(path, _ref2) {
var _ref2$opts = _ref2.opts;
_ref2$opts = _ref2$opts === undefined ? {} : _ref2$opts;
var include = _ref2$opts.include,
exclude = _ref2$opts.exclude;
MemberExpression(path, { opts: { include, exclude } = {} }) {
if (path.get("object").matchesPattern("process.env")) {
var key = path.toComputedKey();
const key = path.toComputedKey();
if (t.isStringLiteral(key) && (!include || include.indexOf(key.value) !== -1) && (!exclude || exclude.indexOf(key.value) === -1)) {

@@ -18,0 +11,0 @@ path.replaceWith(t.valueToNode(process.env[key.value]));

{
"name": "babel-plugin-transform-inline-environment-variables",
"version": "0.3.0-alpha.670b24ec",
"version": "0.3.0-alpha.6ae655c0",
"description": "Inline environment variables.",

@@ -5,0 +5,0 @@ "keywords": [

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