We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9230ba4 commit bbac862Copy full SHA for bbac862
src/index.ts
@@ -1,17 +1,9 @@
1
export function css(...args: (string | number | boolean | undefined | null | void)[]) {
2
return args
3
- .filter(value => {
4
- if (typeof value === 'string') {
5
- return true
6
- }
7
-
8
- return false
9
- })
10
- .map(i => (i as string).trim() || '')
11
- .filter(Boolean)
12
.join(' ')
13
.split(' ')
14
15
- .filter((item, pos, self) => self.indexOf(item) === pos)
+ .filter((item, pos, self) =>
+ item.length === 0 || ['1', '0', 'true'].includes(item) ? false : self.indexOf(item) === pos
+ )
16
17
}
0 commit comments