evrythng-scan

3.0.0-pre • Public • Published

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.

Package Sidebar

Install

npm i evrythng-scan

Weekly Downloads

0

Version

3.0.0-pre

License

Apache-2.0

Last publish

Collaborators

  • evt-master