@dqbd/tiktoken
Advanced tools
Comparing version 1.0.12 to 1.0.13
@@ -172,10 +172,2 @@ let wasm; | ||
static __wrap(ptr) { | ||
ptr = ptr >>> 0; | ||
const obj = Object.create(Tiktoken.prototype); | ||
obj.__wbg_ptr = ptr; | ||
TiktokenFinalization.register(obj, obj.__wbg_ptr, obj); | ||
return obj; | ||
} | ||
__destroy_into_raw() { | ||
@@ -205,3 +197,4 @@ const ptr = this.__wbg_ptr; | ||
const ret = wasm.tiktoken_new(ptr0, len0, addHeapObject(special_tokens), ptr1, len1); | ||
return Tiktoken.__wrap(ret); | ||
this.__wbg_ptr = ret >>> 0; | ||
return this; | ||
} | ||
@@ -220,3 +213,3 @@ /** | ||
v1 = getStringFromWasm0(r0, r1).slice(); | ||
wasm.__wbindgen_export_2(r0, r1 * 1); | ||
wasm.__wbindgen_export_2(r0, r1 * 1, 1); | ||
} | ||
@@ -249,3 +242,3 @@ return v1; | ||
var v2 = getArrayU32FromWasm0(r0, r1).slice(); | ||
wasm.__wbindgen_export_2(r0, r1 * 4); | ||
wasm.__wbindgen_export_2(r0, r1 * 4, 4); | ||
return v2; | ||
@@ -270,3 +263,3 @@ } finally { | ||
var v2 = getArrayU32FromWasm0(r0, r1).slice(); | ||
wasm.__wbindgen_export_2(r0, r1 * 4); | ||
wasm.__wbindgen_export_2(r0, r1 * 4, 4); | ||
return v2; | ||
@@ -326,3 +319,3 @@ } finally { | ||
var v2 = getArrayU8FromWasm0(r0, r1).slice(); | ||
wasm.__wbindgen_export_2(r0, r1 * 1); | ||
wasm.__wbindgen_export_2(r0, r1 * 1, 1); | ||
return v2; | ||
@@ -345,3 +338,3 @@ } finally { | ||
var v1 = getArrayU8FromWasm0(r0, r1).slice(); | ||
wasm.__wbindgen_export_2(r0, r1 * 1); | ||
wasm.__wbindgen_export_2(r0, r1 * 1, 1); | ||
return v1; | ||
@@ -367,3 +360,3 @@ } finally { | ||
export function __wbg_stringify_e25465938f3f611f() { return handleError(function (arg0) { | ||
export function __wbg_stringify_daa6661e90c04140() { return handleError(function (arg0) { | ||
const ret = JSON.stringify(getObject(arg0)); | ||
@@ -392,3 +385,3 @@ return addHeapObject(ret); | ||
export function __wbg_parse_670c19d4e984792e() { return handleError(function (arg0, arg1) { | ||
export function __wbg_parse_06816e879d29d4df() { return handleError(function (arg0, arg1) { | ||
const ret = JSON.parse(getStringFromWasm0(arg0, arg1)); | ||
@@ -395,0 +388,0 @@ return addHeapObject(ret); |
{ | ||
"name": "@dqbd/tiktoken", | ||
"version": "1.0.12", | ||
"version": "1.0.13", | ||
"description": "JS/WASM bindings for tiktoken", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -251,3 +251,4 @@ let wasm; | ||
const ret = wasm.tiktoken_new(ptr0, len0, addHeapObject(special_tokens), ptr1, len1); | ||
return Tiktoken.__wrap(ret); | ||
this.__wbg_ptr = ret >>> 0; | ||
return this; | ||
} | ||
@@ -266,3 +267,3 @@ /** | ||
v1 = getStringFromWasm0(r0, r1).slice(); | ||
wasm.__wbindgen_export_2(r0, r1 * 1); | ||
wasm.__wbindgen_export_2(r0, r1 * 1, 1); | ||
} | ||
@@ -295,3 +296,3 @@ return v1; | ||
var v2 = getArrayU32FromWasm0(r0, r1).slice(); | ||
wasm.__wbindgen_export_2(r0, r1 * 4); | ||
wasm.__wbindgen_export_2(r0, r1 * 4, 4); | ||
return v2; | ||
@@ -316,3 +317,3 @@ } finally { | ||
var v2 = getArrayU32FromWasm0(r0, r1).slice(); | ||
wasm.__wbindgen_export_2(r0, r1 * 4); | ||
wasm.__wbindgen_export_2(r0, r1 * 4, 4); | ||
return v2; | ||
@@ -372,3 +373,3 @@ } finally { | ||
var v2 = getArrayU8FromWasm0(r0, r1).slice(); | ||
wasm.__wbindgen_export_2(r0, r1 * 1); | ||
wasm.__wbindgen_export_2(r0, r1 * 1, 1); | ||
return v2; | ||
@@ -391,3 +392,3 @@ } finally { | ||
var v1 = getArrayU8FromWasm0(r0, r1).slice(); | ||
wasm.__wbindgen_export_2(r0, r1 * 1); | ||
wasm.__wbindgen_export_2(r0, r1 * 1, 1); | ||
return v1; | ||
@@ -417,3 +418,3 @@ } finally { | ||
export function __wbg_stringify_e25465938f3f611f() { return handleError(function (arg0) { | ||
export function __wbg_stringify_daa6661e90c04140() { return handleError(function (arg0) { | ||
const ret = JSON.stringify(getObject(arg0)); | ||
@@ -438,3 +439,3 @@ return addHeapObject(ret); | ||
export function __wbg_parse_670c19d4e984792e() { return handleError(function (arg0, arg1) { | ||
export function __wbg_parse_06816e879d29d4df() { return handleError(function (arg0, arg1) { | ||
const ret = JSON.parse(getStringFromWasm0(arg0, arg1)); | ||
@@ -441,0 +442,0 @@ return addHeapObject(ret); |
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 2 instances in 1 package
14318807
4
2686