diff --git a/.gitattributes b/.gitattributes
index 391f0a4..6313b56 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,2 +1 @@
-* text=auto
-*.js text eol=lf
+* text=auto eol=lf
diff --git a/.travis.yml b/.travis.yml
index e0cc348..2ae9d62 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,4 +1,5 @@
language: node_js
node_js:
+ - '10'
- '8'
- '6'
diff --git a/readme.md b/readme.md
index 46fa906..e5adf94 100644
--- a/readme.md
+++ b/readme.md
@@ -184,7 +184,7 @@ Returns `true` if the value is an `Array` and the `.length` is more than 0.
##### .emptyObject(value)
-Returns `true` if the value is an `Object` and `Object.keys(value).length` is 0.
+Returns `true` if the value is an `Object` and `Object.keys(value).length` is 0.
Please note that `Object.keys` returns only own enumerable properties. Hence something like this can happen:
@@ -202,7 +202,7 @@ is.emptyObject(object1);
// => true
```
-##### .nonEmptyObject(value)
+##### .nonEmptyObject(value)
Returns `true` if the value is an `Object` and `Object.keys(value).length` is more than 0.
diff --git a/source/index.ts b/source/index.ts
index 534700b..3ae4dd1 100644
--- a/source/index.ts
+++ b/source/index.ts
@@ -2,7 +2,6 @@
///
///
///
-import util from 'util';
import symbolObservable from 'symbol-observable';
type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array;
@@ -245,7 +244,7 @@ namespace is { // tslint:disable-line:no-namespace
return value >= Math.min(...range) && value <= Math.max(...range);
}
- throw new TypeError(`Invalid range: ${util.inspect(range)}`);
+ throw new TypeError(`Invalid range: ${JSON.stringify(range)}`);
};
const NODE_TYPE_ELEMENT = 1;
@@ -290,7 +289,7 @@ namespace is { // tslint:disable-line:no-namespace
type ArrayMethod = (fn: (value: any, index: number, array: any[]) => boolean, thisArg?: any) => boolean;
const predicateOnArray = (method: ArrayMethod, predicate: any, values: any[]) => {
if (function_(predicate) === false) {
- throw new TypeError(`Invalid predicate: ${util.inspect(predicate)}`);
+ throw new TypeError(`Invalid predicate: ${JSON.stringify(predicate)}`);
}
if (values.length === 0) {