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

@types/uglify-js

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/uglify-js

TypeScript definitions for uglify-js

  • 3.17.5
  • ts4.6
  • ts4.7
  • ts4.8
  • ts4.9
  • ts5.0
  • ts5.1
  • ts5.2
  • ts5.3
  • ts5.4
  • ts5.5
  • ts5.6
  • ts5.7
  • ts5.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.2M
decreased by-4.02%
Maintainers
1
Weekly downloads
 
Created

What is @types/uglify-js?

@types/uglify-js provides TypeScript type definitions for the UglifyJS JavaScript minification tool. UglifyJS is used to compress and minify JavaScript files, making them smaller and faster to load.

What are @types/uglify-js's main functionalities?

Minify JavaScript Code

This feature allows you to minify JavaScript code, reducing its size and improving load times. The code sample demonstrates how to use UglifyJS to minify a simple JavaScript function.

const UglifyJS = require('uglify-js');
const code = 'function add(a, b) { return a + b; }';
const result = UglifyJS.minify(code);
console.log(result.code);

Compress JavaScript Code

This feature enables compression of JavaScript code, which can further reduce the size of the output. The code sample shows how to use the compress option to achieve this.

const UglifyJS = require('uglify-js');
const code = 'function add(a, b) { return a + b; }';
const result = UglifyJS.minify(code, { compress: true });
console.log(result.code);

Mangle Variable Names

This feature allows you to mangle variable names, making the code harder to read and reverse-engineer. The code sample demonstrates how to use the mangle option to obfuscate variable names.

const UglifyJS = require('uglify-js');
const code = 'function add(a, b) { return a + b; }';
const result = UglifyJS.minify(code, { mangle: true });
console.log(result.code);

Other packages similar to @types/uglify-js

FAQs

Package last updated on 01 Mar 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

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