Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including round-floor-ceil with all npm packages installed. Try it out:

var roundFloorCeil = require("round-floor-ceil")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

round-floor-ceil v0.1.1

Create mozilla's round10 ceil10 floor10

Round Floor Ceil

Create mozilla's round10 ceil10 floor10


var round_floor_ceil = require('round-floor-ceil');

floor10 - round down to the tenth-number value


round_floor_ceil.floor10(1.77, -1);                                                                                   
// returns 1.7                                                          

ceil10 - round up to the tenth-number value


round_floor_ceil.ceil10(1.77, -1);                                                                                   
// returns 1.8                                                   


npm test


In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free