New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@criterium/typebox

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@criterium/typebox

create the typebox query schema for a given typebox entity schema

latest
Source
npmnpm
Version
0.4.0
Version published
Maintainers
1
Created
Source

@criterium/typebox

@criterium/typebox create typebox query schema for given typebox entity schema.

install

npm i @criterium/typebox

usage

import { Type as t } from 'typebox';
import { queryOf } from '@criterium/typebox';
import { Value } from 'typebox/value';

const User = t.Object({
  name: t.String(),
  address: t.Object({
    street: t.String(),
  }),
});

const UserQuery = queryOf(t, User);

Value.Check(UserQuery, {
  address: {
    street: {
      $in: ['SF', 'NY'],
    },
  },
})
// success

Value.Check(UserQuery, {
  is_admin: {
    $eq: true,
  },
})
// fail

Keywords

mongodb

FAQs

Package last updated on 05 Mar 2026

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