Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am cwoelk on github.
  • I am cwoelk (https://keybase.io/cwoelk) on keybase.
  • I have a public key ASAwSaudMaG3XPLlSI--9Nz-Dg37pQxTa14jROBFS-uBIgo

To claim this, I am signing this object:

const express = require('express');
const startTime = Date.now();
const app = express();
app.disable('x-powered-by');
app.disable('etag');
const port = 3000;
@cwoelk
cwoelk / extend.js
Created February 7, 2012 18:53
Copy properties from one object to another overwriting only if forced
function extend(obj, add, replace) {
if (!add) return obj;
var keys = Object.keys(add), i = keys.length;
while (i--) {
if (!obj[keys[i]] || replace) obj[keys[i]] = add[keys[i]];
}
return obj;
}