Skip to content

Instantly share code, notes, and snippets.

@stalniy
Created October 16, 2020 19:01
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/9addf3c5165ab190cf55b82e0b2b0093 to your computer and use it in GitHub Desktop.
Save stalniy/9addf3c5165ab190cf55b82e0b2b0093 to your computer and use it in GitHub Desktop.
UCAST dot notation
const test = guard({ 'author.id': 1 });
const sifter = sift({ 'author.id': 1 });
console.log(test({ author: { id: 1 } })) // true
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