How to use the ceil function from lodash

Find comprehensive JavaScript lodash.ceil code examples handpicked from public code repositorys.

45
46
47
48
49
50
51
52
53
54
module.exports.bound               = _.bound;
module.exports.camelCase           = _.camelCase;
module.exports.capitalize          = _.capitalize;
module.exports.castArray           = _.castArray;
module.exports.cat                 = _.cat;
module.exports.ceil                = _.ceil;
module.exports.chain               = _.chain;
module.exports.chunk               = _.chunk;
module.exports.chunkAll            = _.chunkAll;
module.exports.chunkContrib        = _.chunkContrib;
fork icon19
star icon122
watch icon0

+ 92 other calls in file

536
537
538
539
540
541
542
543
544
545
546
547
548
// Math


const add = _.add(6, 4);
console.log(add); // => 10


const ceil = _.ceil(4.006);
console.log(ceil); // => 5


const divide = _.divide(6, 4);
console.log(divide); // => 1.5
fork icon0
star icon4
watch icon0

+ 15 other calls in file

653
654
655
656
657
658
659
660
661
if(params.rangeKey && !_.find(attributeDefinitions, { 'AttributeName': params.rangeKey })) {
  attributeDefinitions.push(internals.attributeDefinition(table.schema, params.rangeKey));
}

var currentWriteThroughput = data.Table.ProvisionedThroughput.WriteCapacityUnits;
var newIndexWriteThroughput = _.ceil(currentWriteThroughput * 1.5);
params.writeCapacity = params.writeCapacity || newIndexWriteThroughput;

table.log.info('adding index %s to table %s', params.name, table.tableName());
fork icon0
star icon0
watch icon1

731
732
733
734
735
736
737
738
739
740

if(adjustment.math[1] === '*') {
  result = _.floor(result, p);
}
else if(adjustment.math[1] === '/') {
  result = _.ceil(result, p);
}
else {
  result = _.round(result, p);
}
fork icon0
star icon0
watch icon0

+ 2 other calls in file

Other functions in lodash

Sorted by popularity

function icon

lodash.get is the most popular function in lodash (7670 examples)