Code coverage report for nodash/lib/num.js

Statements: 100% (11 / 11)      Branches: 100% (4 / 4)      Functions: 100% (6 / 6)      Lines: 100% (11 / 11)      Ignored: none     

All files » nodash/lib/ » num.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38      1     36       2       1       29           30       242 84 158 75   83        
/* vim: set et sw=2 ts=2: */
'use strict';
 
module.exports = {
 
  '+ add ADD plus PLUS': function (a, b) {
    return a + b;
  },
 
  '- minus MINUS': function (a, b) {
    return a - b;
  },
 
  'sub subtract': function (a, b) {
    return b - a;
  },
 
  '* mul MUL times TIMES': function (a, b) {
    return a * b;
  },
 
  abs: Math.abs,
 
  negate: function (x) {
    return -x;
  },
 
  signum: function (x) {
    if (x > 0) {
      return 1;
    } else if (x === 0) {
      return 0;
    }
    return -1;
  }
  
};