fluent-criteria
TypeScript icon, indicating that this package has built-in type declarations

1.3.0 • Public • Published

Fluent criteria logo

🌊 Criteria for JavaScript & TypeScript in a fluent way

NPM Unpacked Size npm bundle size NPM Version

📥 Installation

npm i fluent-criteria

🕹️ Playground

https://stackblitz.com/edit/fluent-criteria-example

📖 Usage

import { FluentCriteria } from 'fluent-criteria';
import { IUser, users } from './users.dataset';

const criteria = new FluentCriteria<IUser>();

const usersWithEmail = criteria.search.email.defined.find(users);
console.log('Users with email: ', usersWithEmail);

const usersAsAdmin = criteria.search.role.equal('admin').find(users);
console.log('Users that are admin: ', usersAsAdmin);

const usersWithThumbnailWithPixels =
  criteria.search.profile.thumbnail.pixels.defined.find(users);
console.log('Users with thumbnail and pixels: ', usersWithThumbnailWithPixels);

📦 Packages

📦 CommonJS

const { FluentCriteria } = require('fluent-criteria');

📦 ESM

import { FluentCriteria } from 'fluent-criteria';

📦 TypeScript

import { FluentCriteria } from 'fluent-criteria';

📝 License

This project is licensed under the GNU AFFERO GENERAL PUBLIC LICENSE - see the LICENSE file for details

Package Sidebar

Install

npm i fluent-criteria

Weekly Downloads

4

Version

1.3.0

License

ISC

Unpacked Size

53 kB

Total Files

37

Last publish

Collaborators

  • xutyxd