Skip to content

Commit

Permalink
Merge 2591818 into 5b2917d
Browse files Browse the repository at this point in the history
  • Loading branch information
ilijapuaca committed Apr 15, 2021
2 parents 5b2917d + 2591818 commit 5650a4b
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions loader.js
@@ -1,11 +1,10 @@
const sse4_crc32c = require('./impls/sse4_crc32c');
const js_crc32c = require('./impls/js_crc32c');

module.exports = (function() {
const impls = [
'./impls/sse4_crc32c',
'./impls/js_crc32c',
];
for (const impl of impls) {
const impls = [sse4_crc32c, js_crc32c];
for (const crc32 of impls) {
try {
const crc32 = require(impl);
if (crc32.calculate('The quick brown fox jumps over the lazy dog') === 0x22620404) {
return crc32;
}
Expand Down

0 comments on commit 5650a4b

Please sign in to comment.