10 examples of 'jquery round up' in JavaScript

Every line of 'jquery round up' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
4function round(v, n) {
5 return +(Math.round(v + 'e+' + n) + 'e-' + n);
6}
4function round(value) {
5 return parseInt(value * 100, 10) / 100;
6}
57export function round (n, decimals = 0) {
58 return Number(`${Math.round(`${n}e${decimals}`)}e-${decimals}`);
59}
5export function round(
6 n: number,
7 precision: number = defaultPrecision,
8): number {
9 return +n.toFixed(precision)
10}
83function round(val){return val.toFixed(6);}
32function round2(number) {
33 return Math.round(number * 100) / 100;
34}
186function round(val, precision, method) {
187 var fn = math[method || 'round'];
188 var multiplier = math.pow(10, math.abs(precision || 0));
189 if(precision < 0) multiplier = 1 / multiplier;
190 return fn(val * multiplier) / multiplier;
191}
162export function myRound (v, digits = 2) {
163 var p = Math.pow(10, digits)
164 return Math.round(v * p) / p
165 }
131export function round(value: number, decimals: number = 0): number
132{
133 return Math.round(value * Math.pow(10, decimals)) / Math.pow(10, decimals);
134}
89_roundValue ( value ) {
90
91 return Number ( value.toFixed ( this.options.decimals ) );
92
93}

Related snippets