append-to-all-attributes
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "append-to-all-attributes", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Append a string to all attributes in the object passed", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -10,1 +10,27 @@ # append-to-all-attributes | ||
``` | ||
## Usage | ||
```js | ||
const appendToAllAttributes = require('append-to-all-attributes); | ||
appendToAllAttributes({ | ||
sanFrancisco_to_newYork: 50, | ||
madrid_to_barcelona: 5, | ||
withChilds: { | ||
onlyOneLevel: "It will not apply to inner attributes" | ||
} | ||
}, "__by_car"); | ||
//=> | ||
{ | ||
sanFrancisco_to_newYork__by_car: 50, | ||
madrid_to_barcelona__by_car: 5, | ||
withChilds__by_car: { | ||
onlyOneLevel: "It will not apply to inner attributes" | ||
} | ||
} | ||
``` | ||
## License | ||
MIT © [Fabio Espinosa](http://fabioespinosa.mit.edu) |
1776
36