hadron-type-checker
Advanced tools
Comparing version 4.0.3 to 4.0.4
'use strict'; | ||
const isPlainObject = require('lodash.isplainobject'); | ||
const isArray = require('lodash.isarray'); | ||
const isString = require('lodash.isstring'); | ||
const isNumber = require('lodash.isnumber'); | ||
const has = require('lodash.has'); | ||
const keys = require('lodash.keys'); | ||
const without = require('lodash.without'); | ||
const toNumber = require('lodash.tonumber'); | ||
const toString = require('lodash.tostring'); | ||
const includes = require('lodash.includes'); | ||
const bson = require('bson'); | ||
const MinKey = bson.MinKey; | ||
const MaxKey = bson.MaxKey; | ||
const Long = bson.Long; | ||
const Double = bson.Double; | ||
const Int32 = bson.Int32; | ||
const Decimal128 = bson.Decimal128; | ||
const Binary = bson.Binary; | ||
const BSONRegExp = bson.BSONRegExp; | ||
const Code = bson.Code; | ||
const Symbol = bson.Symbol; | ||
const Timestamp = bson.Timestamp; | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
var isPlainObject = require('lodash.isplainobject'); | ||
var isArray = require('lodash.isarray'); | ||
var isString = require('lodash.isstring'); | ||
var isNumber = require('lodash.isnumber'); | ||
var has = require('lodash.has'); | ||
var keys = require('lodash.keys'); | ||
var without = require('lodash.without'); | ||
var toNumber = require('lodash.tonumber'); | ||
var toString = require('lodash.tostring'); | ||
var includes = require('lodash.includes'); | ||
var bson = require('bson'); | ||
var MinKey = bson.MinKey; | ||
var MaxKey = bson.MaxKey; | ||
var Long = bson.Long; | ||
var Double = bson.Double; | ||
var Int32 = bson.Int32; | ||
var Decimal128 = bson.Decimal128; | ||
var Binary = bson.Binary; | ||
var BSONRegExp = bson.BSONRegExp; | ||
var Code = bson.Code; | ||
var _Symbol = bson.Symbol; | ||
var Timestamp = bson.Timestamp; | ||
/** | ||
* The object string. | ||
*/ | ||
const OBJECT = 'Object'; | ||
var OBJECT = 'Object'; | ||
@@ -34,3 +38,3 @@ /** | ||
*/ | ||
const ARRAY = 'Array'; | ||
var ARRAY = 'Array'; | ||
@@ -40,3 +44,3 @@ /** | ||
*/ | ||
const TRUE = 'true'; | ||
var TRUE = 'true'; | ||
@@ -46,3 +50,3 @@ /** | ||
*/ | ||
const FALSE = 'false'; | ||
var FALSE = 'false'; | ||
@@ -52,11 +56,11 @@ /** | ||
*/ | ||
const LONG = 'Long'; | ||
var LONG = 'Long'; | ||
const INT_32 = 'Int32'; | ||
const INT_64 = 'Int64'; | ||
const DOUBLE = 'Double'; | ||
const DECIMAL_128 = 'Decimal128'; | ||
const OBJECT_TYPE = '[object Object]'; | ||
const EMPTY = ''; | ||
const OBJECT_ID = 'ObjectID'; | ||
var INT_32 = 'Int32'; | ||
var INT_64 = 'Int64'; | ||
var DOUBLE = 'Double'; | ||
var DECIMAL_128 = 'Decimal128'; | ||
var OBJECT_TYPE = '[object Object]'; | ||
var EMPTY = ''; | ||
var OBJECT_ID = 'ObjectID'; | ||
@@ -66,3 +70,3 @@ /** | ||
*/ | ||
const BSON_TYPE = '_bsontype'; | ||
var BSON_TYPE = '_bsontype'; | ||
@@ -72,3 +76,3 @@ /** | ||
*/ | ||
const MATCH = /\[object (\w+)\]/; | ||
var MATCH = /\[object (\w+)\]/; | ||
@@ -78,3 +82,3 @@ /** | ||
*/ | ||
const BSON_INT32_MAX = 0x7FFFFFFF; | ||
var BSON_INT32_MAX = 0x7FFFFFFF; | ||
@@ -84,6 +88,6 @@ /** | ||
*/ | ||
const BSON_INT32_MIN = -0x80000000; | ||
var BSON_INT32_MIN = -0x80000000; | ||
const BSON_INT64_MAX = Math.pow(2, 63) - 1; | ||
const BSON_INT64_MIN = -(BSON_INT64_MAX); | ||
var BSON_INT64_MAX = Math.pow(2, 63) - 1; | ||
var BSON_INT64_MIN = -BSON_INT64_MAX; | ||
@@ -93,3 +97,3 @@ /** | ||
*/ | ||
const NUMBER_REGEX = /^-?\d+$/; | ||
var NUMBER_REGEX = /^-?\d+$/; | ||
@@ -99,30 +103,25 @@ /** | ||
*/ | ||
const NUMBER_TYPES = [ | ||
'Long', | ||
'Int32', | ||
'Double', | ||
'Decimal128' | ||
]; | ||
var NUMBER_TYPES = ['Long', 'Int32', 'Double', 'Decimal128']; | ||
const toDate = (object) => { | ||
var toDate = function toDate(object) { | ||
return new Date(object); | ||
}; | ||
const toMinKey = () => { | ||
var toMinKey = function toMinKey() { | ||
return new MinKey(); | ||
}; | ||
const toMaxKey = () => { | ||
var toMaxKey = function toMaxKey() { | ||
return new MaxKey(); | ||
}; | ||
const toUndefined = () => { | ||
var toUndefined = function toUndefined() { | ||
return undefined; | ||
}; | ||
const toNull = () => { | ||
var toNull = function toNull() { | ||
return null; | ||
}; | ||
const toBoolean = (object) => { | ||
var toBoolean = function toBoolean(object) { | ||
if (isString(object)) { | ||
@@ -134,3 +133,3 @@ if (object.toLowerCase() === TRUE) { | ||
} | ||
throw new Error(`'${object}' is not a valid boolean string`); | ||
throw new Error('\'' + object + '\' is not a valid boolean string'); | ||
} | ||
@@ -143,3 +142,3 @@ if (object) { | ||
const toObject = (object) => { | ||
var toObject = function toObject(object) { | ||
if (isPlainObject(object)) { | ||
@@ -151,3 +150,3 @@ return object; | ||
const toArray = (object) => { | ||
var toArray = function toArray(object) { | ||
if (isArray(object)) { | ||
@@ -159,30 +158,30 @@ return object; | ||
} | ||
return [ object ]; | ||
return [object]; | ||
}; | ||
const toInt32 = (object) => { | ||
var toInt32 = function toInt32(object) { | ||
if (object === '-' || object === '') { | ||
throw new Error(`Value '${object}' is not a valid Int32 value`); | ||
throw new Error('Value \'' + object + '\' is not a valid Int32 value'); | ||
} | ||
const number = toNumber(object); | ||
var number = toNumber(object); | ||
if (number >= BSON_INT32_MIN && number <= BSON_INT32_MAX) { | ||
return new Int32(number); | ||
} | ||
throw new Error(`Value ${number} is outside the valid Int32 range`); | ||
throw new Error('Value ' + number + ' is outside the valid Int32 range'); | ||
}; | ||
const toInt64 = (object) => { | ||
var toInt64 = function toInt64(object) { | ||
if (object === '-' || object === '') { | ||
throw new Error(`Value '${object}' is not a valid Int64 value`); | ||
throw new Error('Value \'' + object + '\' is not a valid Int64 value'); | ||
} | ||
const number = toNumber(object); | ||
var number = toNumber(object); | ||
if (number >= BSON_INT64_MIN && number <= BSON_INT64_MAX) { | ||
return Long.fromNumber(number); | ||
} | ||
throw new Error(`Value ${number} is outside the valid Int64 range`); | ||
throw new Error('Value ' + number + ' is outside the valid Int64 range'); | ||
}; | ||
const toDouble = (object) => { | ||
var toDouble = function toDouble(object) { | ||
if (object === '-' || object === '') { | ||
throw new Error(`Value '${object}' is not a valid Double value`); | ||
throw new Error('Value \'' + object + '\' is not a valid Double value'); | ||
} | ||
@@ -192,7 +191,7 @@ if (isString(object) && object.endsWith('.')) { | ||
} | ||
const number = toNumber(object); | ||
var number = toNumber(object); | ||
return new Double(number); | ||
}; | ||
const toDecimal128 = (object) => { | ||
var toDecimal128 = function toDecimal128(object) { | ||
/* | ||
@@ -207,3 +206,3 @@ If converting a BSON Object, extract the value before converting to a string. | ||
const toObjectID = (object) => { | ||
var toObjectID = function toObjectID(object) { | ||
if (!isString(object) || object === '') { | ||
@@ -215,20 +214,20 @@ return new bson.ObjectID(); | ||
const toBinary = (object) => { | ||
var toBinary = function toBinary(object) { | ||
return new Binary(String(object), Binary.SUBTYPE_DEFAULT); | ||
}; | ||
const toRegex = (object) => { | ||
var toRegex = function toRegex(object) { | ||
return new BSONRegExp(String(object)); | ||
}; | ||
const toCode = (object) => { | ||
var toCode = function toCode(object) { | ||
return new Code(String(object), {}); | ||
}; | ||
const toSymbol = (object) => { | ||
return new Symbol(String(object)); | ||
var toSymbol = function toSymbol(object) { | ||
return new _Symbol(String(object)); | ||
}; | ||
const toTimestamp = (object) => { | ||
const number = toNumber(object); | ||
var toTimestamp = function toTimestamp(object) { | ||
var number = toNumber(object); | ||
return Timestamp.fromNumber(number); | ||
@@ -240,3 +239,3 @@ }; | ||
*/ | ||
const CASTERS = { | ||
var CASTERS = { | ||
'Array': toArray, | ||
@@ -266,3 +265,3 @@ 'Binary': toBinary, | ||
*/ | ||
const TYPES = keys(CASTERS); | ||
var TYPES = keys(CASTERS); | ||
@@ -272,27 +271,48 @@ /** | ||
*/ | ||
class Int32Check { | ||
test(string) { | ||
if (NUMBER_REGEX.test(string)) { | ||
var value = toNumber(string); | ||
return value >= BSON_INT32_MIN && value <= BSON_INT32_MAX; | ||
} | ||
return false; | ||
var Int32Check = function () { | ||
function Int32Check() { | ||
_classCallCheck(this, Int32Check); | ||
} | ||
} | ||
_createClass(Int32Check, [{ | ||
key: 'test', | ||
value: function test(string) { | ||
if (NUMBER_REGEX.test(string)) { | ||
var value = toNumber(string); | ||
return value >= BSON_INT32_MIN && value <= BSON_INT32_MAX; | ||
} | ||
return false; | ||
} | ||
}]); | ||
return Int32Check; | ||
}(); | ||
/** | ||
* Checks if a string is an int64. | ||
*/ | ||
class Int64Check { | ||
test(string) { | ||
if (NUMBER_REGEX.test(string)) { | ||
return Number.isSafeInteger(toNumber(string)); | ||
} | ||
return false; | ||
var Int64Check = function () { | ||
function Int64Check() { | ||
_classCallCheck(this, Int64Check); | ||
} | ||
} | ||
const INT32_CHECK = new Int32Check(); | ||
const INT64_CHECK = new Int64Check(); | ||
_createClass(Int64Check, [{ | ||
key: 'test', | ||
value: function test(string) { | ||
if (NUMBER_REGEX.test(string)) { | ||
return Number.isSafeInteger(toNumber(string)); | ||
} | ||
return false; | ||
} | ||
}]); | ||
return Int64Check; | ||
}(); | ||
var INT32_CHECK = new Int32Check(); | ||
var INT64_CHECK = new Int64Check(); | ||
/** | ||
@@ -305,3 +325,3 @@ * Gets the BSON type for a JS number. | ||
*/ | ||
const numberToBsonType = (number) => { | ||
var numberToBsonType = function numberToBsonType(number) { | ||
var string = toString(number); | ||
@@ -319,65 +339,84 @@ if (INT32_CHECK.test(string)) { | ||
*/ | ||
class TypeChecker { | ||
/** | ||
* Cast the provided object to the desired type. | ||
* | ||
* @param {Object} object - The object to cast. | ||
* @param {String} type - The type. | ||
* | ||
* @returns {Object} The cast object. | ||
*/ | ||
cast(object, type) { | ||
var caster = CASTERS[type]; | ||
var result = object; | ||
if (caster) { | ||
result = caster(object); | ||
} | ||
return result === OBJECT_TYPE ? EMPTY : result; | ||
var TypeChecker = function () { | ||
function TypeChecker() { | ||
_classCallCheck(this, TypeChecker); | ||
} | ||
/** | ||
* Get the type for the object. | ||
* | ||
* @param {Object} object - The object. | ||
* | ||
* @returns {String} The object type. | ||
*/ | ||
type(object) { | ||
if (isNumber(object)) { | ||
return numberToBsonType(object); | ||
_createClass(TypeChecker, [{ | ||
key: 'cast', | ||
/** | ||
* Cast the provided object to the desired type. | ||
* | ||
* @param {Object} object - The object to cast. | ||
* @param {String} type - The type. | ||
* | ||
* @returns {Object} The cast object. | ||
*/ | ||
value: function cast(object, type) { | ||
var caster = CASTERS[type]; | ||
var result = object; | ||
if (caster) { | ||
result = caster(object); | ||
} | ||
return result === OBJECT_TYPE ? EMPTY : result; | ||
} | ||
if (isPlainObject(object)) { | ||
return OBJECT; | ||
} | ||
if (isArray(object)) { | ||
return ARRAY; | ||
} | ||
if (has(object, BSON_TYPE)) { | ||
if (object._bsontype === LONG) { | ||
return INT_64; | ||
/** | ||
* Get the type for the object. | ||
* | ||
* @param {Object} object - The object. | ||
* | ||
* @returns {String} The object type. | ||
*/ | ||
}, { | ||
key: 'type', | ||
value: function type(object) { | ||
if (isNumber(object)) { | ||
return numberToBsonType(object); | ||
} | ||
if (object._bsontype === OBJECT_ID) { | ||
return 'ObjectId'; | ||
if (isPlainObject(object)) { | ||
return OBJECT; | ||
} | ||
return object._bsontype; | ||
if (isArray(object)) { | ||
return ARRAY; | ||
} | ||
if (has(object, BSON_TYPE)) { | ||
if (object._bsontype === LONG) { | ||
return INT_64; | ||
} | ||
if (object._bsontype === OBJECT_ID) { | ||
return 'ObjectId'; | ||
} | ||
return object._bsontype; | ||
} | ||
return Object.prototype.toString.call(object).replace(MATCH, '$1'); | ||
} | ||
return Object.prototype.toString.call(object).replace(MATCH, '$1'); | ||
} | ||
/** | ||
* Get a list of types the object can be cast to. | ||
* | ||
* @param {Boolean} highPrecisionSupport - If Decimal128 is supported or not. | ||
* | ||
* @returns {Array} The available types. | ||
*/ | ||
castableTypes(highPrecisionSupport = false) { | ||
if (highPrecisionSupport === true) { | ||
return TYPES; | ||
/** | ||
* Get a list of types the object can be cast to. | ||
* | ||
* @param {Boolean} highPrecisionSupport - If Decimal128 is supported or not. | ||
* | ||
* @returns {Array} The available types. | ||
*/ | ||
}, { | ||
key: 'castableTypes', | ||
value: function castableTypes() { | ||
var highPrecisionSupport = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; | ||
if (highPrecisionSupport === true) { | ||
return TYPES; | ||
} | ||
return without(TYPES, DECIMAL_128); | ||
} | ||
return without(TYPES, DECIMAL_128); | ||
} | ||
} | ||
}]); | ||
module.exports = new TypeChecker(); | ||
return TypeChecker; | ||
}(); | ||
module.exports = new TypeChecker(); |
@@ -7,3 +7,3 @@ { | ||
"homepage": "https://github.com/mongodb-js/hadron-type-checker", | ||
"version": "4.0.3", | ||
"version": "4.0.4", | ||
"repository": { | ||
@@ -21,3 +21,5 @@ "type": "git", | ||
"test": "mocha --recursive", | ||
"check": "mongodb-js-precommit" | ||
"check": "mongodb-js-precommit", | ||
"prepublish": "babel ./src --out-dir ./lib", | ||
"pretest": "babel ./src --out-dir ./lib" | ||
}, | ||
@@ -28,2 +30,5 @@ "precommit": [ | ||
"dependencies": { | ||
"babel-preset-es2015": "^6.24.1", | ||
"babel-preset-react": "^6.5.0", | ||
"babel-register": "^6.5.2", | ||
"bson": "^1.0.1", | ||
@@ -43,2 +48,3 @@ "lodash.has": "^4.4.0", | ||
"devDependencies": { | ||
"babel-cli": "^6.9.0", | ||
"chai": "^3.4.1", | ||
@@ -45,0 +51,0 @@ "eslint-config-mongodb-js": "^2.2.0", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
65719
16
661
15
7
+ Addedbabel-preset-es2015@^6.24.1
+ Addedbabel-preset-react@^6.5.0
+ Addedbabel-register@^6.5.2
+ Addedansi-regex@2.1.1(transitive)
+ Addedansi-styles@2.2.1(transitive)
+ Addedbabel-code-frame@6.26.0(transitive)
+ Addedbabel-core@6.26.3(transitive)
+ Addedbabel-generator@6.26.1(transitive)
+ Addedbabel-helper-builder-react-jsx@6.26.0(transitive)
+ Addedbabel-helper-call-delegate@6.24.1(transitive)
+ Addedbabel-helper-define-map@6.26.0(transitive)
+ Addedbabel-helper-function-name@6.24.1(transitive)
+ Addedbabel-helper-get-function-arity@6.24.1(transitive)
+ Addedbabel-helper-hoist-variables@6.24.1(transitive)
+ Addedbabel-helper-optimise-call-expression@6.24.1(transitive)
+ Addedbabel-helper-regex@6.26.0(transitive)
+ Addedbabel-helper-replace-supers@6.24.1(transitive)
+ Addedbabel-helpers@6.24.1(transitive)
+ Addedbabel-messages@6.23.0(transitive)
+ Addedbabel-plugin-check-es2015-constants@6.22.0(transitive)
+ Addedbabel-plugin-syntax-flow@6.18.0(transitive)
+ Addedbabel-plugin-syntax-jsx@6.18.0(transitive)
+ Addedbabel-plugin-transform-es2015-arrow-functions@6.22.0(transitive)
+ Addedbabel-plugin-transform-es2015-block-scoped-functions@6.22.0(transitive)
+ Addedbabel-plugin-transform-es2015-block-scoping@6.26.0(transitive)
+ Addedbabel-plugin-transform-es2015-classes@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-computed-properties@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-destructuring@6.23.0(transitive)
+ Addedbabel-plugin-transform-es2015-duplicate-keys@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-for-of@6.23.0(transitive)
+ Addedbabel-plugin-transform-es2015-function-name@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-literals@6.22.0(transitive)
+ Addedbabel-plugin-transform-es2015-modules-amd@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-modules-commonjs@6.26.2(transitive)
+ Addedbabel-plugin-transform-es2015-modules-systemjs@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-modules-umd@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-object-super@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-parameters@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-shorthand-properties@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-spread@6.22.0(transitive)
+ Addedbabel-plugin-transform-es2015-sticky-regex@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-template-literals@6.22.0(transitive)
+ Addedbabel-plugin-transform-es2015-typeof-symbol@6.23.0(transitive)
+ Addedbabel-plugin-transform-es2015-unicode-regex@6.24.1(transitive)
+ Addedbabel-plugin-transform-flow-strip-types@6.22.0(transitive)
+ Addedbabel-plugin-transform-react-display-name@6.25.0(transitive)
+ Addedbabel-plugin-transform-react-jsx@6.24.1(transitive)
+ Addedbabel-plugin-transform-react-jsx-self@6.22.0(transitive)
+ Addedbabel-plugin-transform-react-jsx-source@6.22.0(transitive)
+ Addedbabel-plugin-transform-regenerator@6.26.0(transitive)
+ Addedbabel-plugin-transform-strict-mode@6.24.1(transitive)
+ Addedbabel-preset-es2015@6.24.1(transitive)
+ Addedbabel-preset-flow@6.23.0(transitive)
+ Addedbabel-preset-react@6.24.1(transitive)
+ Addedbabel-register@6.26.0(transitive)
+ Addedbabel-runtime@6.26.0(transitive)
+ Addedbabel-template@6.26.0(transitive)
+ Addedbabel-traverse@6.26.0(transitive)
+ Addedbabel-types@6.26.0(transitive)
+ Addedbabylon@6.18.0(transitive)
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedchalk@1.1.3(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedconvert-source-map@1.9.0(transitive)
+ Addedcore-js@2.6.12(transitive)
+ Addeddebug@2.6.9(transitive)
+ Addeddetect-indent@4.0.0(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedesutils@2.0.3(transitive)
+ Addedglobals@9.18.0(transitive)
+ Addedhas-ansi@2.0.0(transitive)
+ Addedhome-or-tmp@2.0.0(transitive)
+ Addedinvariant@2.2.4(transitive)
+ Addedis-finite@1.1.0(transitive)
+ Addedjs-tokens@3.0.2(transitive)
+ Addedjsesc@0.5.01.3.0(transitive)
+ Addedjson5@0.5.1(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedloose-envify@1.4.0(transitive)
+ Addedminimatch@3.1.2(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedmkdirp@0.5.6(transitive)
+ Addedms@2.0.0(transitive)
+ Addedos-homedir@1.0.2(transitive)
+ Addedos-tmpdir@1.0.2(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedprivate@0.1.8(transitive)
+ Addedregenerate@1.4.2(transitive)
+ Addedregenerator-runtime@0.11.1(transitive)
+ Addedregenerator-transform@0.10.1(transitive)
+ Addedregexpu-core@2.0.0(transitive)
+ Addedregjsgen@0.2.0(transitive)
+ Addedregjsparser@0.1.5(transitive)
+ Addedrepeating@2.0.1(transitive)
+ Addedslash@1.0.0(transitive)
+ Addedsource-map@0.5.7(transitive)
+ Addedsource-map-support@0.4.18(transitive)
+ Addedstrip-ansi@3.0.1(transitive)
+ Addedsupports-color@2.0.0(transitive)
+ Addedto-fast-properties@1.0.3(transitive)
+ Addedtrim-right@1.0.1(transitive)