AMD support
This commit is contained in:
parent
5cc2f712b1
commit
1c3573ca77
24
crc32.js
24
crc32.js
@ -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);
|
||||
}));
|
||||
|
Loading…
Reference in New Issue
Block a user