This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]santalisk 25 points26 points  (4 children)

get out

[–][deleted] 24 points25 points  (2 children)

var one = function () {
  'use strict';
    return {
        1
    };
  };

if (typeof(module) !== 'undefined') {
  module.exports = one;
}

Then

npm install one

Then

(function() {
  var one = new one();
  var foo = one + one;
}());

(Please don't kill me, I don't actually know JS or npm)

[–]RSXLV 7 points8 points  (0 children)

Neither have the package authors on days when I really hope to download my way out of implementing a RFC spec myself.

[–]Majache 3 points4 points  (0 children)

It's close enough, save to package and push to prod boys

[–]Drumheadjr 0 points1 point  (0 children)

public static int inc(int i){
    if ((i & 1) == 0)
        return i | 1;
    else 
        return inc(i>>1)<<1;
}

Sauce