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

3xpr

Package Overview
Dependencies
Maintainers
1
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

3xpr - npm Package Compare versions

Comparing version 1.15.23 to 1.15.24

2

package.json
{
"name": "3xpr",
"version": "1.15.23",
"version": "1.15.24",
"description": "expressions",

@@ -5,0 +5,0 @@ "author": "Flavio Lionel Rita <flaviolrita@hotmail.com>",

@@ -107,2 +107,31 @@ # 3xpr

## Extend
You can extend the library by adding enums, constants, formats, operators, and functions.
To do this, use the following functions:
- **AddConstant**: Adds a constant to the library.
- **AddEnum**: Adds an enumeration to the library.
- **AddFormat**: Adds a format to the library.
- **AddOperator**: Adds an operator to the library.
- **AddFunction**: Adds a function to the library.
### Example
```typescript
import { expressions as exp } from '3xpr'
const CryptoJS = require('crypto-js')
exp.addFunction(
'encrypt(value:string):string',
(value: string, key:string):string => CryptoJS.AES.encrypt(value, key).toString(),
{ description: 'Encrypt a string' }
)
exp.addFunction(
'decrypt(value:string):string',
(value: string, key:string):string => CryptoJS.AES.decrypt(value, key).toString(CryptoJS.enc.Utf8),
{ description: 'Decrypt a string' }
)
```
## Related projects

@@ -109,0 +138,0 @@

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