File size: 389 Bytes
b5ea024
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
"use strict";

var ensureObject = require("type/object/ensure")
  , ensure       = require("type/ensure");

var objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable;

module.exports = function (object) {
	ensure(["object", object, ensureObject]);
	for (var key in object) {
		if (!objPropertyIsEnumerable.call(object, key)) continue;
		delete object[key];
	}
	return object;
};