// Copyright (c) 2015 Lloyd Brookes <75pound@gmail.com> (MIT)
// https://github.com/75lb/array-tools

// Deep query an array

var toArray = require('../lang/toArray')
var testval = require('../lang/testval')

function where (arr, query) {
  arr = toArray(arr)
  return arr.filter(function (item) {
    return testval(item, query)
  })
}

module.exports = where

@@ -200,16 +200,50 @@
 estval')
+%0Avar filter  = require('./filter')
 %0A%0Afuncti
@@ -287,16 +287,17 @@
 ay(arr)%0A
+%0A
   return
@@ -301,19 +301,20 @@
 urn 
-arr.
 filter(
+arr, 
 func

update array/where.js