walk-apple-news-format
v1.0.0
Published
Walk the components in an apple news format JSON structure.
Downloads
540
Readme
walk-apple-news-format
Walk the components in an apple news format JSON structure.
Installation
Download node at nodejs.org and install it, if you haven't already.
npm install walk-apple-news-format --save
Usage
import walk from 'walk-apple-news-format';
const appleNewsFormat = {
components: [{
role: 'container',
components: [{
role: 'container',
components: [{
role: 'photo',
URL: 'bundle://image-1'
}]
}]
}]
};
// walk will call the callback once for all components, even nested
walk(appleNewsFormat, function (component) {
console.log('component', component);
});
Tests
npm install
npm test
Dependencies
None
Dev Dependencies
- ava: Futuristic test runner 🚀
- babel-cli: Babel command line.
- babel-core: Babel compiler core.
- babel-preset-es2015: Babel preset for all es2015 plugins.
- semistandard: All the goodness of
feross/standard
with semicolons sprinkled on top. - snazzy: Format JavaScript Standard Style as Stylish (i.e. snazzy) output
License
MIT
Generated by package-json-to-readme