-
Notifications
You must be signed in to change notification settings - Fork 564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minor cleanup #229
Minor cleanup #229
Conversation
cfceb3f
to
a6280eb
Compare
"opn-cli": "4.0.0" | ||
"benchmark": "^2.1.4", | ||
"browserify": "^16.2.3", | ||
"mocha": "^8.3.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated mocha
too, the listed version threw errors on startup for me.
@JedWatson tests are passing, but the Travis CI for this repository appears to have disappeared. |
|
||
export interface ClassArray extends Array<ClassValue> {} | ||
|
||
export function classNames(...args: ClassArray): string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the Class
prefix (redundant when you are importing).
The mapping of string
to truthy values was different between between arrays and objects, which is not what our tests dictate. Changed that.
@@ -8,15 +8,10 @@ | |||
// Michal Adamczyk <https://github.com/mradamczyk> | |||
// Marvin Hagemeister <https://github.com/marvinhagemeister> | |||
|
|||
export type ClassValue = string | number | ClassDictionary | ClassArray | undefined | null | boolean; | |||
export type Value = string | number | boolean | undefined | null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if Value
is a nice name to be honest.
These types aren't exactly capturing the subtlety of the meaning behind string
arguments, compared to truthy values.
For posterity, I benchmarked the |
Firstly, this PR changes the first branch when unpacking object's, back to the primary behavior, with the
toString
behaviour as an addendum, and fixes some of the mixed indentation that was merged previously.Secondly, after updating the developer dependencies, I removed the
open-cli
test target and dependency, as it attempts toopen
in a compatible program, but squashes any errors.I don't think opening the default browser is useful when testing compared to maybe providing instructions in the README.