Skip to content

Instantly share code, notes, and snippets.

@stalniy
Created October 16, 2020 18:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stalniy/b6fe0d99fef8bf7b2dd7aebbdd9c2efb to your computer and use it in GitHub Desktop.
Save stalniy/b6fe0d99fef8bf7b2dd7aebbdd9c2efb to your computer and use it in GitHub Desktop.
ucast and sift.js difference
import { guard } from '@ucast/mongo2js';
import sift from 'sift';
const test = guard({ author: { id: 1 } });
const sifter = sift({ author: { id: 1 } });
console.log(test({ author: { id: 1 } })) // false
console.log(sifter({ author: { id: 1 } })) // true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment