(data, byteOffset, loader, test)
| 57164 | }); |
| 57165 | } |
| 57166 | function testBinary(data, byteOffset, loader, test) { |
| 57167 | if (test instanceof ArrayBuffer) return (0, _loaderUtils.compareArrayBuffers)(test, data, test.byteLength); |
| 57168 | switch((0, _typeofDefault.default)(test)){ |
| 57169 | case "function": |
| 57170 | return test(data, loader); |
| 57171 | case "string": |
| 57172 | var magic = getMagicString(data, byteOffset, test.length); |
| 57173 | return test === magic; |
| 57174 | default: |
| 57175 | return false; |
| 57176 | } |
| 57177 | } |
| 57178 | function getFirstCharacters(data) { |
| 57179 | var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 5; |
| 57180 | if (typeof data === "string") return data.slice(0, length); |
no test coverage detected