UNPKG

fin

Version:

Developer CLI for Fin. Fin is the easiest way to launch your own SaaS.

22 lines (21 loc) 542 B
/** * Raise the value of the first parameter to the power of the second using the es7 `**` operator. * * ### Example (es module) * ```js * import { power } from 'typescript-starter' * console.log(power(2,3)) * // => 8 * ``` * * ### Example (commonjs) * ```js * var power = require('typescript-starter').power; * console.log(power(2,3)) * // => 8 * ``` */ export function power(base: number, exponent: number): number { // This is a proposed es7 operator, which should be transpiled by Typescript return base ** exponent }