walk-apple-news-format

1.0.0 • Public • Published

walk-apple-news-format Build Status

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

Readme

Keywords

none

Package Sidebar

Install

npm i walk-apple-news-format

Weekly Downloads

196

Version

1.0.0

License

MIT

Last publish

Collaborators

  • kesla