Socket
Socket
Sign inDemoInstall

terser

Package Overview
Dependencies
Maintainers
1
Versions
180
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

terser - npm Package Compare versions

Comparing version 4.3.11 to 4.4.0

4

CHANGELOG.md
# Changelog
## v4.4.0
- Added `/*#__INLINE__*/` and `/*#__NOINLINE__*/` annotations for calls. If a call has one of these, it either forces or forbids inlining.
## v4.3.11

@@ -4,0 +8,0 @@

2

package.json

@@ -7,3 +7,3 @@ {

"license": "BSD-2-Clause",
"version": "4.3.11",
"version": "4.4.0",
"engines": {

@@ -10,0 +10,0 @@ "node": ">=6.0.0"

@@ -1195,2 +1195,26 @@ <h1><img src="https://terser.org/img/terser-banner-logo.png" alt="Terser" width="400"></h1>

### Annotations
Annotations in Terser are a way to tell it to treat a certain function call differently. The following annotations are available:
* `/*@__INLINE__*/` - forces a function to be inlined somewhere.
* `/*@__NOINLINE__*/` - Makes sure the called function is not inlined into the call site.
* `/*@__PURE__*/` - Marks a function call as pure. That means, it can safely be dropped.
You can use either a `@` sign at the start, or a `#`.
Here are some examples on how to use them:
```javascript
/*@__INLINE__*/
function_always_inlined_here()
/*#__NOINLINE__*/
function_cant_be_inlined_into_here()
const x = /*#__PURE__*/i_am_dropped_if_x_is_not_used()
```
### Working with Terser AST

@@ -1197,0 +1221,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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