Skip to content

Commit

Permalink
Merge pull request #1 from jsonjoy-com/base64
Browse files Browse the repository at this point in the history
Base64
  • Loading branch information
streamich authored Apr 9, 2024
2 parents 5f60a16 + 078580f commit bf18cfe
Show file tree
Hide file tree
Showing 30 changed files with 13 additions and 782 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"tslib": "2"
},
"dependencies": {
"@jsonjoy.com/base64": "^1.1.1",
"hyperdyperid": "^1.2.0",
"thingies": "^1.20.0"
},
Expand Down
3 changes: 2 additions & 1 deletion src/json-binary/codec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {JsonPackExtension, JsonPackValue} from '../msgpack';
import {fromBase64, toBase64} from '../util/base64';
import {fromBase64} from '@jsonjoy.com/base64/lib/fromBase64';
import {toBase64} from '@jsonjoy.com/base64/lib/toBase64';
import {isUint8Array} from '../util/buffers/isUint8Array';
import {binUriStart, msgPackExtStart, msgPackUriStart} from './constants';
import {binary_string} from './types';
Expand Down
2 changes: 1 addition & 1 deletion src/json/JsonDecoder.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {decodeUtf8} from '../util/buffers/utf8/decodeUtf8';
import {Reader} from '../util/buffers/Reader';
import {fromBase64Bin} from '../util/base64/fromBase64Bin';
import {fromBase64Bin} from '@jsonjoy.com/base64/lib/fromBase64Bin';
import {findEndingQuote} from './util';
import type {BinaryJsonDecoder, PackValue} from '../types';

Expand Down
2 changes: 1 addition & 1 deletion src/json/JsonDecoderDag.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {JsonDecoder} from './JsonDecoder';
import {findEndingQuote} from './util';
import type {PackValue} from '../types';
import {createFromBase64Bin} from '../util/base64/createFromBase64Bin';
import {createFromBase64Bin} from '@jsonjoy.com/base64/lib/createFromBase64Bin';

export const fromBase64Bin = createFromBase64Bin(undefined, '');

Expand Down
2 changes: 1 addition & 1 deletion src/json/JsonEncoder.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {toBase64Bin} from '../util/base64/toBase64Bin';
import {toBase64Bin} from '@jsonjoy.com/base64/lib/toBase64Bin';
import type {IWriter, IWriterGrowable} from '../util/buffers';
import type {BinaryJsonEncoder, StreamingBinaryJsonEncoder} from '../types';

Expand Down
2 changes: 1 addition & 1 deletion src/json/JsonEncoderDag.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {JsonEncoderStable} from './JsonEncoderStable';
import {createToBase64Bin} from '../util/base64/createToBase64Bin';
import {createToBase64Bin} from '@jsonjoy.com/base64/lib/createToBase64Bin';

const objBaseLength = '{"/":{"bytes":""}}'.length;
const cidBaseLength = '{"/":""}'.length;
Expand Down
91 changes: 0 additions & 91 deletions src/util/base64/README.md

This file was deleted.

77 changes: 0 additions & 77 deletions src/util/base64/__bench__/decode.js

This file was deleted.

98 changes: 0 additions & 98 deletions src/util/base64/__bench__/encode.js

This file was deleted.

20 changes: 0 additions & 20 deletions src/util/base64/__tests__/decode-base64url.spec.ts

This file was deleted.

31 changes: 0 additions & 31 deletions src/util/base64/__tests__/decode-bin.spec.ts

This file was deleted.

Loading

0 comments on commit bf18cfe

Please sign in to comment.