/x-ray-build

A helper that build a x-ray based on a schema

Primary LanguageJavaScriptMIT LicenseMIT

x-ray-build

Build Status Coverage Status

A helper that build a x-ray based on a schema.

Getting started

npm install x-ray-build
const x = require('x-ray');
const build = require('x-ray-build');

const drive = x();
const crawl = build(drive, {
  $source: 'https://github.com/diogoazevedos',
  $context: '[itemscope]',
  $selector: {
    name: '.vcard-fullname',
    repos: {
      $context: '.source',
      $selector: [{
        name: '.repo',
      }],
    },
  },
});

crawl((e, content) => console.log(content));