UNPKG

easy-api.ts

Version:

A powerful library to create your own API with ease.

1 lines 758 B
Object.defineProperty(exports,"__esModule",{value:!0});let APIFunction_1=require("../../classes/structures/APIFunction"),Error_1=require("../../classes/structures/Error"),Util_1=require("../../classes/internal/Util");class Exp extends APIFunction_1.APIFunction{name="$exp";description="Returns e (the base of natural logarithms) raised to a power.";parameters=[{name:"Value",description:"A numeric expression representing the power of e.",type:APIFunction_1.ParamType.Number,required:!0,rest:!1,defaultValue:null}];usage="$exp[number]";returns=APIFunction_1.ParamType.Number;aliases=[];compile=!0;async run(e,[r]){if(Util_1.Util.isNumber(r))return Math.exp(Number(r)).toString();throw new Error_1.InvalidFieldIndex(r,e.function,"Value")}}exports.default=Exp;