easy-api.ts
Version:
A powerful library to create your own API with ease.
1 lines • 655 B
JavaScript
Object.defineProperty(exports,"__esModule",{value:!0});let APIFunction_1=require("../../classes/structures/APIFunction"),Util_1=require("../../classes/internal/Util");class TypeOf extends APIFunction_1.APIFunction{name="$typeof";description="Returns the type of the given value.";parameters=[{name:"Value",description:"Value to be checked.",type:APIFunction_1.ParamType.String,required:!0,rest:!1,defaultValue:null}];usage="$typeof[value]";returns=APIFunction_1.ParamType.String;compile=!0;aliases=[];async run(e,[t]){var r=Util_1.Util.parse(t);return"object"==typeof r?t.startsWith("[")&&t.endsWith("]")?"array":"object":typeof r}}exports.default=TypeOf;