wry-bindgen 0.2.122-alpha.7

Native desktop implementation of wasm-bindgen APIs using wry
Documentation
1
2
function is_undefined(x){return x===void 0}function is_null(x){return x===null}function is_null_or_undefined(x){return x===null||x===void 0}function is_array(x){return Array.isArray(x)}function is_true(x){return x===!0}function is_false(x){return x===!1}function get_typeof(x){return typeof x}function is_falsy(x){return!x}function is_truthy(x){return!!x}function is_object(x){return typeof x==="object"&&x!==null}function is_function(x){return typeof x==="function"}function is_string(x){return typeof x==="string"}function is_symbol(x){return typeof x==="symbol"}function is_bigint(x){return typeof x==="bigint"}function bigint_from_str(x){return BigInt(x)}function symbol_new(description){return Symbol(description??void 0)}function bigint_get_as_i64(x){return typeof x==="bigint"?BigInt.asIntN(64,x):null}function reflect_get(target,key){return Reflect.get(target,key)}function as_string(x){return typeof x==="string"?x:null}function as_f64(x){return typeof x==="number"?x:null}function as_number(x){return+x}function try_into_number(x){try{return+x}catch(e){return e}}function debug_string(val){let type=typeof val;if(type=="number"||type=="boolean"||val==null)return`${val}`;if(type=="string")return`"${val}"`;if(type=="symbol"){let description=val.description;return description==null?"Symbol":`Symbol(${description})`}if(type=="function"){let name=val.name;return typeof name=="string"&&name.length>0?`Function(${name})`:"Function"}if(Array.isArray(val)){let length=val.length,debug="[";if(length>0)debug+=debug_string(val[0]);for(let i=1;i<length;i++)debug+=", "+debug_string(val[i]);return debug+="]",debug}let builtInMatches=/\[object ([^\]]+)\]/.exec(toString.call(val)),className;if(builtInMatches&&builtInMatches.length>1)className=builtInMatches[1];else return toString.call(val);if(className=="Object")try{return"Object("+JSON.stringify(val)+")"}catch(_){return"Object"}if(val instanceof Error)return`${val.name}: ${val.message}
${val.stack}`;return className}function js_checked_div(a,b){try{return a/b}catch(e){if(e instanceof RangeError)return e;throw e}}function js_pow(a,b){return a**b}function js_add(a,b){return a+b}function js_sub(a,b){return a-b}function js_mul(a,b){return a*b}function js_div(a,b){return a/b}function js_rem(a,b){return a%b}function js_neg(a){return-a}function js_bit_and(a,b){return a&b}function js_bit_or(a,b){return a|b}function js_bit_xor(a,b){return a^b}function js_bit_not(a){return~a}function js_shl(a,b){return a<<b}function js_shr(a,b){return a>>b}function js_unsigned_shr(a,b){return a>>>b}function js_lt(a,b){return a<b}function js_le(a,b){return a<=b}function js_gt(a,b){return a>b}function js_ge(a,b){return a>=b}function js_loose_eq(a,b){return a==b}function js_strict_eq(a,b){return a===b}function js_in(prop,obj){return prop in obj}function is_error(x){return x instanceof Error}function clone_heap_ref(value){return value}function drop_heap_ref(heapId){window.jsHeap.remove(Number(heapId))}function create_rust_object_wrapper(handle,className){return window.rustExports.createWrapper(handle,className)}function extract_rust_handle(obj){return obj&&typeof obj.__handle==="number"?obj.__handle:null}export{try_into_number,symbol_new,reflect_get,js_unsigned_shr,js_sub,js_strict_eq,js_shr,js_shl,js_rem,js_pow,js_neg,js_mul,js_lt,js_loose_eq,js_le,js_in,js_gt,js_ge,js_div,js_checked_div,js_bit_xor,js_bit_or,js_bit_not,js_bit_and,js_add,is_undefined,is_truthy,is_true,is_symbol,is_string,is_object,is_null_or_undefined,is_null,is_function,is_falsy,is_false,is_error,is_bigint,is_array,get_typeof,extract_rust_handle,drop_heap_ref,debug_string,create_rust_object_wrapper,clone_heap_ref,bigint_get_as_i64,bigint_from_str,as_string,as_number,as_f64};