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

@universal-packages/variable-replacer

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@universal-packages/variable-replacer - npm Package Compare versions

Comparing version 1.6.0 to 1.7.0

evaluate.d.ts

1

index.d.ts

@@ -5,1 +5,2 @@ export * from './replaceVars';

export * from './evaluateAndReplace';
export * from './evaluate';

@@ -21,2 +21,3 @@ "use strict";

__exportStar(require("./evaluateAndReplace"), exports);
__exportStar(require("./evaluate"), exports);
//# sourceMappingURL=index.js.map

2

package.json
{
"name": "@universal-packages/variable-replacer",
"version": "1.6.0",
"version": "1.7.0",
"description": "Easily inject environment variables or provided variables to compose richer strings.",

@@ -5,0 +5,0 @@ "author": "David De Anda <david@universal-packages.com> (https://github.com/universal-packages)",

@@ -122,2 +122,17 @@ # Variable Replacer

#### **`evaluate(input: string, [scope: Object])`**
Evaluates the whole string as a JS expression and returns the actual JS result.
```js
import { evaluate } from '@universal-packages/variable-replacer'
const string = 'a + b'
const result = evaluate(string, { a: 1, b: 2 })
console.log(result)
// > 3
```
## Combine replacements

@@ -124,0 +139,0 @@

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