0.0.2 • Published 8 years ago

@nathanfaucett/object-filter v0.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

object-filter

creates a new object with all elements that pass the test implemented by the provided function.

var objectFilter = require("@nathanfaucett/object-filter");


objectFilter({
        a: "a",
        b: "b",
        c: "c"
    },
    function(value, key) {
        return key === "b";
    }
) === {
    b: "b"
};