@bitblit/ratchet-common 4.0.210-alpha → 4.0.219-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,11 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  export declare class Base64Ratchet {
2
+ private static UTF8_ENCODER;
3
+ private static UTF8_DECODER;
3
4
  static safeObjectToBase64JSON(input: any): any;
4
5
  static safeBase64JSONParse(input: string): any;
5
6
  static generateBase64VersionOfBlob(blob: Blob): Promise<string>;
6
7
  static generateBase64VersionOfString(input: string): string;
7
- static generateBase64VersionOfBuffer(input: Buffer): string;
8
- static base64StringToBuffer(input: string): Buffer;
9
- static base64StringToString(input: string, encoding?: BufferEncoding): string;
8
+ static generateBase64VersionOfUint8Array(input: Uint8Array): string;
9
+ static base64StringToUint8Array(b64encoded: string): Uint8Array;
10
+ static base64StringToString(input: string, encoding?: string): string;
10
11
  }
@@ -0,0 +1,4 @@
1
+ export declare class Uint8ArrayRatchet {
2
+ private constructor();
3
+ static mergeArrays(myArrays: Uint8Array[]): Uint8Array;
4
+ }
@@ -0,0 +1,6 @@
1
+ export declare class WebStreamRatchet {
2
+ private constructor();
3
+ static webReadableStreamToUint8Array(stream: ReadableStream): Promise<Uint8Array>;
4
+ static webReadableStreamToString(stream: ReadableStream): Promise<string>;
5
+ static stringToWebReadableStream(input: string): ReadableStream;
6
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitblit/ratchet-common",
3
- "version": "4.0.210-alpha",
3
+ "version": "4.0.219-alpha",
4
4
  "description": "Common tools for general use",
5
5
  "type": "module",
6
6
  "files": [
@@ -1,9 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
- import { Writable } from 'stream';
4
- export declare class BufferWritable extends Writable {
5
- private _val;
6
- constructor();
7
- _write(chunk: any, encoding: string, callback: any): void;
8
- get value(): Buffer;
9
- }
@@ -1,7 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- import { Readable, ReadableOptions } from 'stream';
3
- export declare class MultiStream extends Readable {
4
- _object: any;
5
- constructor(object: any, options?: ReadableOptions);
6
- _read(): void;
7
- }
@@ -1,12 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
- import { Readable } from 'stream';
4
- export declare class StreamRatchet {
5
- private constructor();
6
- static readableToBufferSync(stream: Readable): Buffer;
7
- static webReadableStreamToBuffer(stream: ReadableStream): Promise<Buffer>;
8
- static webReadableStreamToString(stream: ReadableStream): Promise<string>;
9
- static stringToReadable(input: string): Readable;
10
- static stringToWebReadableStream(input: string): ReadableStream;
11
- static anyToStringReadable(input: any): Readable;
12
- }
@@ -1,8 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- import { Writable } from 'stream';
3
- export declare class StringWritable extends Writable {
4
- private _val;
5
- constructor();
6
- _write(chunk: any, encoding: string, callback: any): void;
7
- get value(): string;
8
- }