mathjs
Version:
Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser with support for symbolic computation, comes with a large set of built-in functions and constants, and offers an integrated solution to work with dif
23 lines (22 loc) • 411 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 var createOct = createBaseFormatterFactory('oct', 8);