0.0.1 • Published 10 years ago

prefixobjpropertyvalues v0.0.1

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

PrefixObjectPropertyValues

Iterates object properties while prepending to string values given prefix using transformation function

api and usage

var prefix = require("prefixobjpropertyvalues")

var data = {
  propertyA: "path",
  propertyB: ["path", "path/inner"]
}

prefix(data, "root", path.join)

console.log(data.propertyA) // "root/path"
console.log(data.propertyB) // ["root/path", "root/path/inner"]