Nodejs Number to Readable Format to_kilometers_per_hour()

Here you can find the source of to_kilometers_per_hour()

Method Source Code

Number.prototype.to_kilometers_per_hour = function() {
  return this / 1000.0 * 3600.0;
};

Related

  1. humanReadableOrder()
    Number.prototype.humanReadableOrder = function() {
      if (this>=1000000000) {
        return (this/1000000000).toFixed(1)+'b';
      if (this>=1000000) {
        return (this/1000000).toFixed(1)+'m';
      if (this>=1000) {
        return (this/1000).toFixed(1)+'k';
    ...
    
  2. humanReadablePrice()
    Number.prototype.humanReadablePrice = function() {
      return (this/10000).toFixed(2);
    };
    
  3. toEnglish()
    var numbersToWords = {
      0: 'zero',
      1: 'one',
      2: 'two',
      3: 'three',
      4: 'four',
      5: 'five',
      6: 'six',
      7: 'seven',
    ...
    
  4. toEnglish()
    var numbersToWords = {
      0: 'zero',
      1: 'one',
      2: 'two',
      3: 'three',
      4: 'four',
      5: 'five',
      6: 'six',
      7: 'seven',
    ...
    
  5. to_kilometers()
    Number.prototype.to_kilometers = function() {
      return this / 1000.0;
    };
    
  6. to_miles()
    Number.prototype.to_miles = function() {
      return this / 1609.344;
    };
    
  7. to_miles_per_hour()
    Number.prototype.to_miles_per_hour = function() {
      return this / 1609.344 * 3600.0;
    };
    
  8. humanize(rounding, delimiter, separator)
    Number.prototype.humanize = function(rounding, delimiter, separator) {
        rounding = (typeof rounding != 'undefined') ?  rounding : 2;
        delimiter = (typeof delimiter != 'undefined') ? delimiter : ',';
        separator = (typeof separator != 'undefined') ? separator : '.';
        var value = (function(value) {
            if (rounding == 0) return Math.round(value);
            var round_by = Math.pow(10, rounding);
            return (Math.round(value * (round_by)) / round_by);
        })(this);
    ...
    
  9. toThousands()
    Number.prototype.toThousands = function() {
      return (this / 1000).toFixed(1) + 'K';
    };