union-class-names

v1.0.1arrow_drop_down
v1.0.1
v1.0.0
STATUS
Passing
DOWNLOADS
45
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
6 years ago
SIZE
1 KB
Returns a string containing all classes without duplicates.
1 contributor
Install union-class-names as a package?
Copied
npm i @bit/tomlandau.belle.utils.union-class-names
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
No preview available
modifieddraft
chevron_left
chevron_right
utils/unionClassNames (
existingClassNames,
additionalClassNames
)

Returns a string containing all classes without duplicates.

Example
// returns 'style-id-23 button buy-button'
unionClassNames('style-id-23 button', 'button buy-button')

Originally inspired by https://github.com/rackt/react-autocomplete/blob/master/lib/union-class-names.js
Arguments
existingClassNames

{String} - one or multiple classes

additionalClassNames

{String} - one or multiple classes

Help and resources