0.2.0 • Published 9 months ago

@criterium/core v0.2.0

Weekly downloads
-
License
ISC
Repository
github
Last release
9 months ago

@criterium/core

@criterium/core is a component of the Criterium project that provides a factory for creating database specific converters. This component is the foundation of Criterium, and is designed to provide a flexible and scalable solution to provide support for various databases and search engines.

With @criterium/core, you can create custom converters, and use them to translate Criterium queries into the appropriate format for the target database. This allows you to work with a wide variety of data sources.

install

npm i @criterium/core

usage

import { converter } from '@criterium/core';

const where = converter({
  operators: {
    $and: (_, __, children) => children.join(' '),
    $eq: ([prop], value) => `${prop} = "${value}"`,
    ...
  }
})

where({
  name: 'John'
})
// name = "John"
0.2.0

9 months ago

0.1.0

1 year ago

0.0.4

1 year ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago