Skip to content
This repository was archived by the owner on Aug 23, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,13 +259,13 @@ assert.notInstanceOf = function(value, constructor, message) {
};

assert.include = function(haystack, needle, message) {
if (!_.include(haystack, needle)) {
if (!_.includes(haystack, needle)) {
fail(haystack, "to include", needle, message, assert.include);
}
};

assert.notInclude = function(haystack, needle, message) {
if (_.include(haystack, needle)) {
if (_.includes(haystack, needle)) {
fail(haystack, "to not include", needle, message, assert.notInclude);
}
};
Expand Down Expand Up @@ -437,7 +437,7 @@ var objectDisplay = function (obj) {
var str = inspect(obj);
var type = Object.prototype.toString.call(obj);

if (str.length >= 40) {
if (str.length >= 250) {
if (type === '[object Function]') {
return !obj.name || obj.name === '' ? '[Function]'
: '[Function: ' + obj.name + ']';
Expand All @@ -452,7 +452,7 @@ var objectDisplay = function (obj) {
return str;
}
} else {
return str;
return JSON.strinfify(obj, null, 4);
}
};

Expand Down Expand Up @@ -808,7 +808,7 @@ if (typeof define == 'function' && typeof define.amd == 'object' &&
} else if (typeof exports === 'object' && !exports.nodeType) {
// Node
var assert = factory(
require('lodash/dist/lodash.legacy')
require('lodash')
);

module.exports = assert;
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "goinstant-assert",
"version": "1.1.2",
"version": "1.1.3",
"author": "GoInstant <support@goinstant.com> (http://www.goinstant.com)",
"description": "Cross-browser/node Assertions Library that runs in legacy browsers.",
"main": "index.js",
Expand All @@ -21,7 +21,7 @@
"blanket": "~1.1.5"
},
"dependencies": {
"lodash": "1.3.1"
"lodash": "4.5.1"
},
"repository": {
"type": "git",
Expand Down