(data, byteOffset, loader, test)
| 5095 | }); |
| 5096 | } |
| 5097 | function testBinary(data, byteOffset, loader, test) { |
| 5098 | if (test instanceof ArrayBuffer) return (0, _loaderUtils.compareArrayBuffers)(test, data, test.byteLength); |
| 5099 | switch((0, _typeofDefault.default)(test)){ |
| 5100 | case "function": |
| 5101 | return test(data, loader); |
| 5102 | case "string": |
| 5103 | var magic = getMagicString(data, byteOffset, test.length); |
| 5104 | return test === magic; |
| 5105 | default: |
| 5106 | return false; |
| 5107 | } |
| 5108 | } |
| 5109 | function getFirstCharacters(data) { |
| 5110 | var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 5; |
| 5111 | if (typeof data === "string") return data.slice(0, length); |
no test coverage detected