Repository navigation
Tags
Tags
fix: simplify dependencies (gajus#159) * Removed usage of is-boolean-object This package was only used once, and incorrectly. is-boolean-object checks whether the input is `true`, `false` or an object created with the `Boolean` constructor. I doubt that this last case was really intended and properly supported since the Typescript type is `boolean` (so, only true/false) and the only code that uses the boolean is this one: ```ts if (useWrapWord) { ``` however, `if (new Boolean(false))` yields `true`. * Removed `is-number-object` dependency This library checks whether the input is a number or a Number object (i.e. created with `new Number(5)`). I never saw anyone using the latter syntax, and I'm not sure the 17+kB-and-10-files dependency is really useful. This is a breaking change since `new Number(5)` will not be allowed anymore for column width. Does anyone really do that? This change is in line with the typescript type annotations for the width, which only allow `number`s to be provided. * Removed the dependency on `is-string` The package tests whether the input is a string or a string object (i.e. created with `new Object('hello')`). I'm not sure we should support the latter syntax, especially since the string is passed to string-width, which explicitely returns 0 if `typeof` doesn't return `string` : https://github.com/sindresorhus/string-width/blob/89eb79aafd2b7db982dc1f5498424232d55dee53/index.js#L6 This is a breaking change in the strict sense, because the behavior would change if such "string-object" was indeed passed as a value, but that would result in an empty cell, so that probably doesn't matter and avoids a dependency on a 16+kB and 10 files * Removed unused dev dependencies
PreviousNext