Skip to content

Instantly share code, notes, and snippets.

@biovisualize
Created February 16, 2017 04:24
Show Gist options
  • Save biovisualize/ef95642ddff94bdce87c7fb352728493 to your computer and use it in GitHub Desktop.
Save biovisualize/ef95642ddff94bdce87c7fb352728493 to your computer and use it in GitHub Desktop.
Wrapper example
(function(root, factory) {
if (typeof module === ‘object’ && module.exports) {
factory(module.exports,
require(‘d3’),
require(‘./datahub-utils.js’).utils,
require(‘./datahub-common.js’).common
)
} else {
factory((root.datahub = root.datahub || {}), root.d3, root.datahub.utils, root.datahub.common)
}
}(this, function(exports, d3, utils, common) {
function render() {
}
exports.chart = {
render: render
}
}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment