-
-
Save haltcase/1baffdd2187180c24ff4194c819a8db0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { _, it } from 'param.macro' | |
const plugins = [ | |
{ name: 'foo', isEnabled: () => false }, | |
{ name: 'bar', isEnabled: () => true }, | |
{ name: 'baz', isEnabled: () => false } | |
] | |
plugins.filter(it.isEnabled()) | |
// -> [{ name: 'bar', isEnabled: [Function] }] | |
const hasOwn = _.hasOwnProperty(_) | |
hasOwn({ rating: 8.6 }, 'rating') | |
// -> true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment