2.0.0 • Published 10 years ago

visit-values v2.0.0

Weekly downloads
2,332
License
MIT
Repository
github
Last release
10 years ago

visit values

Visit all values in an object, depth first order.

Array members will be visited individually as well.

install

npm install --save visit-values

usage

var visit = require('visit-values')
var object = { a: { b: 'c' }}

// prints 'c'
visit(object, function(value, key, parent) {
	console.log(value)
})