Comparing version 0.2.75 to 0.2.76
@@ -13,2 +13,3 @@ /** | ||
export function createEncoder(): Encoder; | ||
export function encode(f: (arg0: Encoder) => void): Uint8Array; | ||
export function length(encoder: Encoder): number; | ||
@@ -15,0 +16,0 @@ export function hasContent(encoder: Encoder): boolean; |
@@ -13,2 +13,3 @@ /** | ||
export function createEncoder(): Encoder; | ||
export function encode(f: (arg0: Encoder) => void): Uint8Array; | ||
export function length(encoder: Encoder): number; | ||
@@ -15,0 +16,0 @@ export function hasContent(encoder: Encoder): boolean; |
@@ -57,2 +57,11 @@ /** | ||
/** | ||
* @param {function(Encoder):void} f | ||
*/ | ||
export const encode = (f) => { | ||
const encoder = createEncoder() | ||
f(encoder) | ||
return toUint8Array(encoder) | ||
} | ||
/** | ||
* The current length of the encoded data. | ||
@@ -59,0 +68,0 @@ * |
{ | ||
"name": "lib0", | ||
"version": "0.2.75", | ||
"version": "0.2.76", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1577456
20283