New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

parcel-optimizer-hoist-object-properties

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

parcel-optimizer-hoist-object-properties

Transform object property name to computed property to compress log names

latest
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

Parcel optimizer hoist object properties

Transform object property name to computed property to compress log names

example

function sample() {
  return {
    // ...
    this_is_a_log_property_name: 'value',
    // ...
  };
}

const this_var = {
  this_is_a_log_property_name: 'value',
};

will transform to

var $prop$a = 'this_is_a_log_property_name';

function sample() {
  return {
    [$prop$a]: 'value',
  };
}

const this_var = {
  [$prop$a]: 'value',
};

and remove any duplicate property name and make it to computed property, but you still need to optimize name by use @parcel/optimizer-swc to minify property names

Usage

{
  "optimizer": {
    // ...
    "*.{js,mjs,cjs}": [
      "parcel-optimizer-hoist-object-properties", 
      "@parcel/optimizer-swc"
    ]
    // ...
  }
}

FAQs

Package last updated on 17 May 2024

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