Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import composite from './composite';
import promisify from './utils/promisify';
import * as MIME from './utils/mime';
import { parseBitmap, getBuffer, getBufferAsync } from './utils/image-bitmap';
import * as constants from './constants';
const alphabet =
'0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_';
// an array storing the maximum string length of hashes at various bases
// 0 and 1 do not exist as possible hash lengths
const maxHashLength = [NaN, NaN];
for (let i = 2; i < 65; i++) {
const maxHash = anyBase(anyBase.BIN, alphabet.slice(0, i))(
new Array(64 + 1).join('1')
);
maxHashLength.push(maxHash.length);
}
// no operation
function noop() {}
// error checking methods
function isArrayBuffer(test) {
return (
Object.prototype.toString
.call(test)
.toLowerCase()
.indexOf('arraybuffer') > -1