New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

indicative-parser

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

indicative-parser - npm Package Compare versions

Comparing version 7.1.1 to 7.1.2

2

package.json
{
"name": "indicative-parser",
"version": "7.1.1",
"version": "7.1.2",
"description": "Schema parser for Indicative",

@@ -5,0 +5,0 @@ "main": "build/index.js",

@@ -24,2 +24,3 @@ <div align="center">

- [Usage](#usage)
- [Typed schema](#typed-schema)
- [Maintainers](#maintainers)

@@ -41,3 +42,3 @@

Instead, we pre-compile the schema (later cache it) and generate a tree, which is easier to reason about and then generated optimized functions from the parsed tree.
Instead, we parse the schema into a tree. The tree is later converted to an array of top level functions that are highly optimized for performance.

@@ -103,2 +104,17 @@ ## Usage

## Typed schema
The parser also allows creating declarative schema that has static type information along with the parsed tree. The type information is really helpful for Typescript projects.
```ts
import { rulesParser, t } from 'indicative-parser'
rulesParser(t.schema({
username: t.string(),
account: t.object().members({
type: t.string(validations.in(['email', 'social']))
})
}))
```
## Maintainers

@@ -105,0 +121,0 @@ [Harminder virk](https://github.com/thetutlage)

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