walk-apple-news-format

Walk the components in an apple news format JSON structure.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
walk-apple-news-format
6171.0.07 years ago7 years agoMinified + gzip package size for walk-apple-news-format in KB

Readme

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