Skip to content

Instantly share code, notes, and snippets.

View sebastianfdez's full-sized avatar
🏠
Working from home

SF sebastianfdez

🏠
Working from home
View GitHub Profile
@pgpbpadilla
pgpbpadilla / sizeof.js
Last active May 1, 2020 14:01
Javascript `sizeof`: Calculates the memory used by an object.
/*jslint indent:2, browser: true, node: true*/
/** Taken from: http://stackoverflow.com/a/11900218/400544 */
'use strict';
(function () {
var typeOfWindow = typeof window;
function sizeof(object) {