UNPKG

4.25 kBMarkdownView Raw
1# Changelog
2
3## v2.5.1 / 2023-12-29
4
5- Remove `workspaces` field from package ([#350](https://github.com/JedWatson/classnames/pull/350))
6
7## v2.5.0 / 2023-12-27
8
9- Restore ability to pass a TypeScript `interface` ([#341](https://github.com/JedWatson/classnames/pull/341))
10- Add `exports` field to package ([#342](https://github.com/JedWatson/classnames/pull/342))
11
12## v2.4.0 / 2023-12-26
13
14- Use string concatenation to increase performance thanks [Jon Koops](https://github.com/jonkoops) ([#336](https://github.com/JedWatson/classnames/pull/336))
15
16## v2.3.3 / 2023-12-21
17
18- Fix default export, thanks [Remco Haszing](https://github.com/remcohaszing) ([#301](https://github.com/JedWatson/classnames/pull/301))
19- Fix types for read-only arrays, thanks [Ben Thompson](https://github.com/BenGearset) ([#307](https://github.com/JedWatson/classnames/pull/307))
20- Replace README examples with functional-style components, thanks [JoeDGit](https://github.com/JoeDGit) ([#303](https://github.com/JedWatson/classnames/pull/303))
21
22## v2.3.2 / 2022-09-13
23
24- Fix TypeScript types when using require, thanks [Mark Dalgleish](https://github.com/markdalgleish) ([#276](https://github.com/JedWatson/classnames/pull/276))
25- Fix toString as `[Object object]` in a vm, thanks [Remco Haszing](https://github.com/remcohaszing) ([#281](https://github.com/JedWatson/classnames/pull/281))
26
27## v2.3.1 / 2021-04-03
28
29- Fix bind/dedupe TypeScript types exports
30- Fix mapping Value types, thanks [Remco Haszing](https://github.com/remcohaszing)
31- Removed non-existent named exports from types, thanks [Remco Haszing](https://github.com/remcohaszing)
32
33## v2.3.0 / 2021-04-01
34
35- Added TypeScript types
36- Added consistent support for custom `.toString()` methods on arguments, thanks [Stanislav Titenko](https://github.com/resetko)
37
38## v2.2.6 / 2018-06-08
39
40- Fixed compatibility issue with usage in an es module environment
41
42## v2.2.5 / 2016-05-02
43
44- Improved performance of `dedupe` variant even further, thanks [Andres Suarez](https://github.com/zertosh)
45
46## v2.2.4 / 2016-04-25
47
48- Improved performance of `dedupe` variant by about 2x, thanks [Bartosz Gościński](https://github.com/bgoscinski)
49
50## v2.2.3 / 2016-01-05
51
52- Updated `bind` variant to use `[].join(' ')` as per the main script in 2.2.2
53
54## v2.2.2 / 2016-01-04
55
56- Switched from string concatenation to `[].join(' ')` for a slight performance gain in the main function.
57
58## v2.2.1 / 2015-11-26
59
60- Add deps parameter to the AMD module, fixes an issue using the Dojo loader, thanks [Chris Jordan](https://github.com/flipperkid)
61
62## v2.2.0 / 2015-10-18
63
64- added a new `bind` variant for use with [css-modules](https://github.com/css-modules/css-modules) and similar abstractions, thanks to [Kirill Yakovenko](https://github.com/blia)
65
66## v2.1.5 / 2015-09-30
67
68- reverted a new usage of `Object.keys` in `dedupe.js` that slipped through in the last release
69
70## v2.1.4 / 2015-09-30
71
72- new case added to benchmarks
73- safer `hasOwnProperty` check
74- AMD module is now named, so you can do the following:
75
76```
77define(["classnames"], function (classNames) {
78 var style = classNames("foo", "bar");
79 // ...
80});
81```
82
83## v2.1.3 / 2015-07-02
84
85- updated UMD wrapper to support AMD and CommonJS on the same pacge
86
87## v2.1.2 / 2015-05-28
88
89- added a proper UMD wrapper
90
91## v2.1.1 / 2015-05-06
92
93- minor performance improvement thanks to type caching
94- improved benchmarking and results output
95
96## v2.1.0 / 2015-05-05
97
98- added alternate `dedupe` version of classNames, which is slower (10x) but ensures that if a class is added then overridden by a falsy value in a subsequent argument, it is excluded from the result.
99
100## v2.0.0 / 2015-05-03
101
102- performance improvement; switched to `Array.isArray` for type detection, which is much faster in modern browsers. A polyfill is now required for IE8 support, see the Readme for details.
103
104## v1.2.2 / 2015-04-28
105
106- license comment updates to simiplify certain build scenarios
107
108## v1.2.1 / 2015-04-22
109
110- added safe exporting for requireJS usage
111- clarified Bower usage and instructions
112
113## v1.2.0 / 2015-03-17
114
115- added comprehensive support for array arguments, including nested arrays
116- simplified code slightly
117
118## Previous
119
120Please see the git history for the details of previous versions.