🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@omegion1npm/molestiae-porro-alias

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

@omegion1npm/molestiae-porro-alias

<header>

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

vᴀꜱᴛly

Everything you need to support a custom expression language in your application.

What is this?

vᴀꜱᴛly is a toolkit for handling expression ASTs (such as those produced by JSEP). These ASTs are a subset of ASTs produced by full-blown parsers like Esprima.

Intended to be used in conjunction with JSEP, but should work with any AST that conforms to the same structure.

Extracted from Mavo.

Features

  • Zero dependencies
  • Small footprint
  • Works in Node and the browser
  • Tree-shakeable

Usage

npm i @omegion1npm/molestiae-porro-alias

Then you can use it either by importing the whole library:

import * as @omegion1npm/molestiae-porro-alias from "@omegion1npm/molestiae-porro-alias"; // or const @omegion1npm/molestiae-porro-alias = require("@omegion1npm/molestiae-porro-alias"); in CJS
import { parse } from "jsep";

const ast = parse("1 + x * y");
const result = @omegion1npm/molestiae-porro-alias.evaluate(ast, {x: 2, y: 3});

or individual functions:

import { evaluate } from "@omegion1npm/molestiae-porro-alias"; // or const { evaluate } = require("@omegion1npm/molestiae-porro-alias"); in CJS
import { parse } from "jsep";

const ast = parse("1 + x * y");
const result = evaluate(ast, {x: 2, y: 3});

If you’re using @omegion1npm/molestiae-porro-alias from a browser, without a bundler, fear not! You can just import from src directly:

import { evaluate } from "https://@omegion1npm/molestiae-porro-alias.mavo.io/src/evaluate.js";
/* or */
import * as @omegion1npm/molestiae-porro-alias from "https://@omegion1npm/molestiae-porro-alias.mavo.io/src/index-fn.js";
/* or */
import { evaluate } from "https://@omegion1npm/molestiae-porro-alias.mavo.io/dist/@omegion1npm/molestiae-porro-alias.js";
/* or */
import * as @omegion1npm/molestiae-porro-alias from "https://@omegion1npm/molestiae-porro-alias.mavo.io/dist/@omegion1npm/molestiae-porro-alias.js";

Full API reference

Keywords

Float64Array

FAQs

Package last updated on 30 Apr 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