rjrodger / patrun

A fast pattern matcher on JavaScript object properties.
MIT License
143 stars 19 forks source link

add lodash to dependencies #16

Closed brandonpsmith closed 4 years ago

brandonpsmith commented 4 years ago

node v12.13.1 npm v6.12.1

npm init npm i patrun

// index.js
var patrun = require('patrun')

var pm = patrun()
      .add({a:1},'A')
      .add({b:2},'B')

// prints A
console.log( pm.find({a:1}) )

// prints null
console.log( pm.find({a:2}) )

// prints A, b:1 is ignored, it was never registered
console.log( pm.find({a:1,b:1}) )

// prints B, c:3 is ignored, it was never registered
console.log( pm.find({b:2,c:3}) )

node index

Error: Cannot find module 'lodash'
coveralls commented 4 years ago

Pull Request Test Coverage Report for Build 74


Totals Coverage Status
Change from base Build 72: 0.0%
Covered Lines: 798
Relevant Lines: 834

💛 - Coveralls
rjrodger commented 4 years ago

forgot to remove reference to lodash - thanks!

brandonpsmith commented 4 years ago

excellent! bought and read your book. it's a great book and really opened my mind to some different microservice patterns. keep up the good work!