Skip to content

Commit

Permalink
Move jsonxl testing function into jsonxl module itself
Browse files Browse the repository at this point in the history
  • Loading branch information
lahmatiy committed Aug 7, 2024
1 parent 991eace commit 055cf96
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/core/encodings/jsonxl-snapshot9.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/core/encodings/jsonxl-snapshot9.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export { decode };
export { decode, isHeaderAcceptable };
declare function decode(data: Uint8Array): any;
declare function isHeaderAcceptable(data: Uint8Array): boolean;
7 changes: 1 addition & 6 deletions src/core/encodings/jsonxl.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import type { Encoding } from '../utils/load-data.js';
import { decode } from './jsonxl-snapshot9.js';

export const JSONXL_MAGIC_NUMBER = [0x00, 0x00, 0x4a, 0x53, 0x4f, 0x4e, 0x58, 0x4c]; // \0\0JSONXL
export function test(chunk: Uint8Array) {
return JSONXL_MAGIC_NUMBER.every((code, idx) => code === chunk[idx]);
}
import { decode, isHeaderAcceptable as test } from './jsonxl-snapshot9.js';

export default Object.freeze({
name: 'jsonxl/snapshot9',
Expand Down

0 comments on commit 055cf96

Please sign in to comment.