X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/f348c89090d46cd58f44ca15623dcc044454f874..2fad14e52c8cde8c45003a2ebb6907a57ca380e4:/libcycript.cy diff --git a/libcycript.cy b/libcycript.cy index 8640a74..4014fd6 100644 --- a/libcycript.cy +++ b/libcycript.cy @@ -25,6 +25,10 @@ var process = { (function() { +this.typeid = function(object) { + return object.$cyt; +}; + let $cy_set = function(object, properties) { for (const name in properties) Object.defineProperty(object, name, { @@ -67,6 +71,8 @@ $cy_set(Error.prototype, { $cy_set(Number.prototype, { toCYON: function() { + if ("$cyt" in this) + return `${this.$cyt.toCYON()}(${this.toString()})`; return `new Number(${this.toString()})`; }, });