source: node_modules/ramda-adjunct/lib/ceil.js

main
Last change on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 843 bytes
RevLine 
[d24f17c]1"use strict";
2
3exports.__esModule = true;
4exports["default"] = void 0;
5var _ramda = require("ramda");
6/**
7 * Returns the smallest integer greater than or equal to a given number.
8 *
9 * Note: ceil(null) returns integer 0 and does not give a NaN error.
10 *
11 * @func ceil
12 * @memberOf RA
13 * @since {@link https://char0n.github.io/ramda-adjunct/2.15.0|v2.15.0}
14 * @category Math
15 * @sig Number -> Number
16 * @param {number} number The number to ceil
17 * @return {number} The smallest integer greater than or equal to the given number
18 * @example
19 *
20 * RA.ceil(.95); //=> 1
21 * RA.ceil(4); //=> 4
22 * RA.ceil(7.004); //=> 8
23 * RA.ceil(-0.95); //=> -0
24 * RA.ceil(-4); //=> -4
25 * RA.ceil(-7.004); //=> -7
26 * RA.ceil(null); //=> 0
27 */
28
29var ceil = (0, _ramda.curryN)(1, (0, _ramda.bind)(Math.ceil, Math));
30var _default = ceil;
31exports["default"] = _default;
Note: See TracBrowser for help on using the repository browser.