source: frontend/node_modules/istanbul-lib-coverage/lib/percent.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 367 bytes
Line 
1/*
2 Copyright 2012-2015, Yahoo Inc.
3 Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
4 */
5'use strict';
6
7module.exports = function percent(covered, total) {
8 let tmp;
9 if (total > 0) {
10 tmp = (1000 * 100 * covered) / total;
11 return Math.floor(tmp / 10) / 100;
12 } else {
13 return 100.0;
14 }
15};
Note: See TracBrowser for help on using the repository browser.