documentcloud / underscore-contrib

The brass buckles on Underscore's utility belt
MIT License
621 stars 117 forks source link

omitPath new function #177

Closed manrueda closed 4 years ago

manrueda commented 10 years ago

I was in the need of exclude nested values of an objects, so extend the omit function to work with paths.

It's a heavy function, but does what need to do...

joshuacc commented 10 years ago

@ManRueda I think this should probably go into the object.builders module.

Then you can use _.snapshot internally and just delete the value at the path.