Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@lanetix/formula-fields-parser
Advanced tools
Parses OData with LX aliases and generates query string options.
This repository contains the WIP Formula Fields Parser. Currently implemented:
Parser
- The formula fields parservisit
- The formula fields AST Visitorerrors
- Built in errors for use with the
visitorvalidate
- The formula fields semantic analysisdefault
The default export is a convenience function that takes the text of a formula, parses it, and runs semantic validation. It takes the following parameters:
formulaText
- The formula textrecordType
- Optional. The type definition of the record the formula is
being applied to. If not provided, all fields are assumed to be semantically
validrecordTypeName
- Optional, but required if recordType
is provided. The
human friendly name of recordType
. If recordType
is provided and this is
not, all fields are assumed to be semantically validIt returns an object with the following properties:
ast
- The formula abstract syntax tree. This may
be undefined if there are errors during the lexing or parsing phases.errors
- An array of any lex,
parse, or semantic
errors that occurred when validating the formula.All errors are guaranteed to have the following properties, although some may have additional:
name
- The name of the error type (e.g. MismatchedTokenException)message
- The error messagelocation
- The location where the error occurredimport parseAndValidate from '@lanetix/formula-fields-parser'
// fields *are not* validated
const { ast, errors } = parseAndValidate('CONCAT($first_name, $last_name)')
// fields are validated
const recordType = ... // get from records service if not available
const recordTypeName = ... // get from records service if not available
const { ast, errors } = parseAndValidate('CONCAT($first_name, $last_name)', recordType, recordTypeName)
FAQs
Parses the lanetix formula DSL.
The npm package @lanetix/formula-fields-parser receives a total of 0 weekly downloads. As such, @lanetix/formula-fields-parser popularity was classified as not popular.
We found that @lanetix/formula-fields-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 11 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.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.