Sha256: af6bac6b0adce705222ee9d129b0228485512e51c451af34da84f4b6fc0a8428

Contents?: true

Size: 842 Bytes

Versions: 4

Compression:

Stored size: 842 Bytes

Contents

/**
 * vis.js module imports
 */

// Try to load dependencies from the global window object.
// If not available there, load via require.

var moment = (typeof window !== 'undefined') && window['moment'] || require('moment');

var Hammer;
if (typeof window !== 'undefined') {
  // load hammer.js only when running in a browser (where window is available)
  Hammer = window['Hammer'] || require('hammerjs');
}
else {
  Hammer = function () {
    throw Error('hammer.js is only available in a browser, not in node.js.');
  }
}

var mousetrap;
if (typeof window !== 'undefined') {
  // load mousetrap.js only when running in a browser (where window is available)
  mousetrap = window['mousetrap'] || require('mousetrap');
}
else {
  mousetrap = function () {
    throw Error('mouseTrap is only available in a browser, not in node.js.');
  }
}


Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
vis-rails-0.0.4 vendor/assets/vis/module/imports.js
vis-rails-0.0.3 vendor/assets/vis/module/imports.js
vis-rails-0.0.2 vendor/assets/vis/module/imports.js
vis-rails-0.0.1 vendor/assets/vis/module/imports.js