Nodejs Number Calculate next()

Here you can find the source of next()

Method Source Code

Number.prototype.next = function(){
    return this+1;
};

Related

  1. intToHSL()
    Number.prototype.intToHSL = function() {
        var shortened = this % 360;
        return "hsl(" + shortened + ",45%,56%)";
    };
    
  2. max(maximum)
    Number.prototype.max = function(maximum) {
        if (this.valueOf() > maximum){
          return maximum;
        } else {
          return this.valueOf();
    };
    
  3. min(minimum)
    Number.prototype.min = function(minimum) {
        if (this.valueOf() < minimum){
          return minimum;
        } else {
          return this.valueOf();
    };
    
  4. modNumber.prototype.mod || (n)
    Number.prototype.mod = Number.prototype.mod || function(n) {
      return ((this%n)+n)%n;
    
  5. mult()
    Number.prototype.mult = function() {
        var w = this;
        for (var i = 0; i < arguments.length; i += 1)
            w *= arguments[i];
        return w;
    var n = 12;
    console.log(n.mult(2, 3));
    console.log((5).mult(2, n));
    ...
    
  6. normalize(num)
    Number.prototype.normalize = function(num) {
      return this*180/num;
    };
    
  7. ordenar()
    #!/usr/bin/env node
    Number.prototype.ordenar = function () {
      return this.toString().split('').sort(up).join('');
    };
    function up (a,b) {
      return a > b ? 1 : a < b ? -1 : 0;
    var x = 0;
    var done= false;
    ...
    
  8. ordinal()
    Number.prototype.ordinal = function () {
        return this + (
            (this % 10 == 1 && this % 100 != 11) ? 'st' :
            (this % 10 == 2 && this % 100 != 12) ? 'nd' :
            (this % 10 == 3 && this % 100 != 13) ? 'rd' : 'th'
            );
    var ResetInput = function(){
        jQuery('input, textarea').each(function() {
    ...
    
  9. ordinalize()
    Number.prototype.ordinalize = function() {
        var abs = Math.abs(this);
        if (abs % 100 >= 11 && abs % 100 <= 13) {
            return this + 'th';
        abs = abs % 10;
        if (abs === 1) { return this + 'st'; }
        if (abs === 2) { return this + 'nd'; }
        if (abs === 3) { return this + 'rd'; }
    ...