Skip to content
Closed
Prev Previous commit
Next Next commit
assert: Use isSet and isMap from process.binding
Updated PR based on comments

Ref: #12142
  • Loading branch information
josephg committed Mar 31, 2017
commit f0518408bf63390732382a3a4a0de3dee79c8308
9 changes: 1 addition & 8 deletions lib/assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
// UTILITY
const compare = process.binding('buffer').compare;
const util = require('util');
const { isSet, isMap } = process.binding('util');
const objectToString = require('internal/util').objectToString;
const Buffer = require('buffer').Buffer;

Expand Down Expand Up @@ -161,14 +162,6 @@ function isArguments(tag) {
return tag === '[object Arguments]';
}

function isMap(object) {
return object.constructor === Map;
}

function isSet(object) {
return object.constructor === Set;
}

function _deepEqual(actual, expected, strict, memos) {
// All identical values are equivalent, as determined by ===.
if (actual === expected) {
Expand Down