3.0.0-pre • Published 7 years ago

evrythng-scan v3.0.0-pre

Weekly downloads
1
License
Apache-2.0
Repository
github
Last release
7 years ago

evrythng-scan.js

js-standard-style

Getting started

Install evrythng-scan.js using npm.

npm install evrythng-scan

Then require it into any module.

const EVT = require('evrythng')
const EVTScan = require('evrythng-scan')

EVT.use(EVTScan)

/* ... Init app using EVT.js ... */

app.scan().then(match => {
  app.redirect(match.redirections[0].redirectUrl)
})

Browser

To use immutable from a browser, download dist/evrythng-scan.min.js or use a CDN such as CDNJS or jsDelivr.

Then, add it as a script tag to your page:

<script src="evrythng.min.js"></script>
<script src="evrythng-scan.min.js"></script>
<script>
    EVT.use(EVTScan)

    /* ... Init app using EVT.js ... */

    app.scan().then(match => {
      app.redirect(match.redirections[0].redirectUrl)
    })
</script>

Or use an AMD loader (such as RequireJS):

require(['./evrythng.min.js', './evrythng-scan.min.js'], (EVT, EVTScan) => {
    EVT.use(EVTScan)

    /* ... Init app using EVT.js ... */

    app.scan().then(match => {
      app.redirect(match.redirections[0].redirectUrl)
    })
})

If you're using browserify, the evrythng-scan npm module also works from the browser.