AMD support #3

Closed
lmk123 wants to merge 1 commits from master into master
Showing only changes of commit 1c3573ca77 - Show all commits

@ -1,7 +1,25 @@
/* crc32.js (C) 2014 SheetJS -- http://sheetjs.com */
/* vim: set ts=2: */
var CRC32 = {};
(function(CRC32) {
var CRC32;
(function (factory) {
if(typeof DO_NOT_EXPORT_CRC === 'undefined') {
if('object' === typeof exports) {
factory(exports);
} else if ('function' === typeof define && define.amd) {
define(function () {
var module = {};
factory(module);
return module;
});
} else {
factory(CRC32 = {});
}
} else {
factory(CRC32 = {});
}
}(function(CRC32) {
CRC32.version = '0.2.2';
/* see perf/crc32table.js */
function signed_crc_table() {
@ -91,4 +109,4 @@ CRC32.table = table;
CRC32.bstr = crc32_bstr;
CRC32.buf = crc32_buf;
CRC32.str = crc32_str;
})(typeof exports !== "undefined" && typeof DO_NOT_EXPORT_CRC === 'undefined' ? exports : CRC32);
}));