
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@qrvey/formula-lang
Advanced tools
import { ENGINES, Transpile } from "@qrvey/formula-lang";
const program = "MID(MID(\"This is a test\", 1, 5), 1, 2)"
const transpiled = Transpile(program, ENGINES.ELASTICSEARCH)
console.log(transpiled)
the output will be
'This is a test'.substring(1, 5).substring(1, 2)
import { ENGINES, TranspileAST } from "@qrvey/formula-lang";
const ast = {
"type": "Program",
"exp": "1 + 2",
"lang": "QrveyLang",
"version": "0.0.0",
"body": {
"operator": "+",
"type": "BinaryExpression",
"left": {
"type": "Literal",
"dataType": "number",
"value": 1
},
"right": {
"type": "Literal",
"dataType": "number",
"value": 2
}
}
}
const transpiled = TranspileAST(ast, ENGINES.ELASTICSEARCH)
console.log(transpiled)
the output will be
(1 + 2)
import { EditorState } from "@codemirror/state";
import { basicSetup } from "codemirror";
import { FormulaHighlight, calculateAST } from "@qrvey/formula-lang"
// set the editor state with the QFormula plugin. This adds the support for
this._state = EditorState.create({
doc: 'Test formula',
extensions: [
basicSetup,
FormulaHighlight(),
...
]
})
// On every edit update you can calculate the AST
private dispatchTextUpdate(state: EditorState) {
const tree = (state as any).tree;
const text = ((state.doc as any).text as Array<string>).join('\n');
const ast = calculateAST(text, tree.topNode);
// dispatch event after return
return { text, ast }
}
The context is a object where implementor can build the information required for the transpiler. For example, the columns that will be used in the formula.
The properties needed are:
false
__tests__/__mocks__/context.ts
> testContext
{ offset: 'String' }
Set the timezone offset in String format.Use this Interfaces and Constants to build a Context
import { FormulaContext, AST_PRIMITIVES } from '"@qrvey/formula-lang"';
In some scenarios will be necessary to clean the Context, for example: Delete columns that will cause Circular Dependencies. This package have a utility call: cleanInvalidItemsInContext
for that
import { cleanInvalidItemsInContext } from "@qrvey/formula-lang";
const cleanContext = cleanInvalidItemsInContext(dirtyContext);
FAQs
QFormula support for qrvey projects
We found that @qrvey/formula-lang demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 14 open source maintainers 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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.