
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
ctxexp-parser
Advanced tools
A parser that can execute JS in an environment that cannot execute JS dynamically.
上下文表达式解析器
在不能动态执行 JS 语言的环境(微信小程序)里执行类 JS 的调用函数。
+1 -1 1.1
([参数])=><返回值>
$.fn(1, 2)
npm i ctxexp-parser
# yarn add ctxexp-parser
const { CtxexpParser } = require("ctxexp-parser");
// import { CtxexpParser } from "ctxexp-parser";
const $ = {
a: "hello",
fn(str, str2) {
return str + str2;
},
runs(...cbs) {
return cbs.map((cb, index) => cb(index));
},
Type(i) {
return ["A", "D", "C"][i];
},
};
const exp = `$.a`;
const res = new CtxexpParser($, exp).exec();
console.log(res); // hello
const exp1 = `$.fn($.a," cxtexp")`;
const res1 = new CtxexpParser($, exp1).exec();
console.log(res1); // hello cxtexp
const exp2 = `$.runs((i)=>$.Type(i)).join("")`;
const res2 = new CtxexpParser($, exp2).exec();
console.log(res2); // A
MIT License
FAQs
A parser that can execute JS in an environment that cannot execute JS dynamically.
The npm package ctxexp-parser receives a total of 0 weekly downloads. As such, ctxexp-parser popularity was classified as not popular.
We found that ctxexp-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.