code: function checkSum(num) {
      if (num == null) {
        return 0;
      }
      var doubled = _splitDigits(num).reverse().map(function(v, idx) {
        return idx % 2 === 0 ? v * 2 : v;
      });
      var sum = doubled.reduce(function(tmp, v) {
        return tmp + _sum(v);
      }, 0);
      var check = 10 - (sum % 10);
      return check === 10 ? 0 : check;
    }
docs: create check sum.
  
  @param {string|number} num
  @return {number} check sum value