Skip to content

Instantly share code, notes, and snippets.

View bdav87's full-sized avatar

Brian Davenport bdav87

View GitHub Profile

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@bdav87
bdav87 / app.js
Last active May 9, 2018 02:25
Passing unit tests
module.exports = {
nestedTypeFilter: function(inputObject, typeSpec) {
//Immediately passes basic filter tests
//Runs through chain of filters otherwise
if ((typeof typeSpec == 'function') && (typeof inputObject != 'object')) {
return basicFilter(inputObject, typeSpec);
} else {
return cycleFilter(inputObject, typeSpec);
}