mjhm / lodash-match-pattern

Deep JSON pattern matching library
MIT License
50 stars 3 forks source link

Improve readability of examples #15

Open kevgo opened 8 years ago

kevgo commented 8 years ago

using ES6 destructuring syntax

{isString} = matchPattern.getLodashModule()

// Example usage:
var testValue = {a: 1, b: 'abc'}
var failResult = matchPattern(testValue, {a: isString, b: 'abc'})