Skip to content

Commit

Permalink
Merge pull request #12 from tannerhodges/master
Browse files Browse the repository at this point in the history
Added UMD support
  • Loading branch information
leongersen committed Jul 18, 2016
2 parents 560aa6a + 896ba40 commit 039aacb
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions wNumb.js
@@ -1,4 +1,22 @@
(function(){
(function (factory) {

if ( typeof define === 'function' && define.amd ) {

// AMD. Register as an anonymous module.
define([], factory);

} else if ( typeof exports === 'object' ) {

// Node/CommonJS
module.exports = factory();

} else {

// Browser globals
window.wNumb = factory();
}

}(function(){

'use strict';

Expand Down Expand Up @@ -330,6 +348,6 @@ var
}

/** @export */
window.wNumb = wNumb;
return wNumb;

}());
}));

0 comments on commit 039aacb

Please sign in to comment.