bool TiValueIsNumber(TiContextRef ctx, TiValueRef value) { TiExcState* exec = toJS(ctx); APIEntryShim entryShim(exec); TiValue jsValue = toJS(exec, value); return jsValue.isNumber(); }
::TiType TiValueGetType(TiContextRef ctx, TiValueRef value) { TiExcState* exec = toJS(ctx); APIEntryShim entryShim(exec); TiValue jsValue = toJS(exec, value); if (jsValue.isUndefined()) return kTITypeUndefined; if (jsValue.isNull()) return kTITypeNull; if (jsValue.isBoolean()) return kTITypeBoolean; if (jsValue.isNumber()) return kTITypeNumber; if (jsValue.isString()) return kTITypeString; ASSERT(jsValue.isObject()); return kTITypeObject; }