UNPKG

547 BJavaScriptView Raw
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.createBin = void 0;
7
8var _baseUtils = require("./baseUtils.js");
9
10/**
11 * Format a number as binary.
12 *
13 * Syntax:
14 *
15 * math.bin(value)
16 *
17 * Examples:
18 *
19 * //the following outputs "0b10"
20 * math.bin(2)
21 *
22 * See also:
23 *
24 * oct
25 * hex
26 *
27 * @param {number} value Value to be stringified
28 * @return {string} The formatted value
29 */
30var createBin = (0, _baseUtils.createBaseFormatterFactory)('bin', 2);
31exports.createBin = createBin;
\No newline at end of file