1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 01:58:06 +02:00

Adds UMD headers to core, display and shared files.

This commit is contained in:
Yury Delendik 2015-11-21 10:32:47 -06:00
parent 1b5940edd2
commit 6b60c8f4db
54 changed files with 1876 additions and 572 deletions

View file

@ -17,10 +17,21 @@
* Based on https://code.google.com/p/smhasher/wiki/MurmurHash3.
* Hashes roughly 100 KB per millisecond on i7 3.4 GHz.
*/
/* globals Uint32ArrayView */
'use strict';
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define('pdfjs/core/murmurhash3', ['exports', 'pdfjs/shared/util'], factory);
} else if (typeof exports !== 'undefined') {
factory(exports, require('../shared/util.js'));
} else {
factory((root.pdfjsCoreMurmurHash3 = {}), root.pdfjsSharedUtil);
}
}(this, function (exports, sharedUtil) {
var Uint32ArrayView = sharedUtil.Uint32ArrayView;
var MurmurHash3_64 = (function MurmurHash3_64Closure (seed) {
// Workaround for missing math precison in JS.
var MASK_HIGH = 0xffff0000;
@ -162,3 +173,6 @@ var MurmurHash3_64 = (function MurmurHash3_64Closure (seed) {
return MurmurHash3_64;
})();
exports.MurmurHash3_64 = MurmurHash3_64;
}));