2020-10-07 12:37:44 +02:00

25 lines
413 B
JavaScript

import { createBaseFormatterFactory } from './baseUtils.js'
/**
* Format a number as octal.
*
* Syntax:
*
* math.oct(value)
*
* Examples:
*
* //the following outputs "0o70"
* math.oct(56)
*
* See also:
*
* bin
* hex
*
* @param {number} value Value to be stringified
* @return {string} The formatted value
*/
export const createOct = createBaseFormatterFactory('oct', 8)