dedupe
variant even further, thanks Andres Suarezdedupe
variant by about 2x, thanks Bartosz Gościńskibind
variant to use [].join(' ')
as per the main script in 2.2.2[].join(' ')
for a slight performance gain in the main function.bind
variant for use with css-modules and similar abstractions, thanks to Kirill YakovenkoObject.keys
in dedupe.js
that slipped through in the last releasehasOwnProperty
checkdefine(["classnames"], function (classNames) {
var style = classNames("foo", "bar");
// ...
});
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.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.Please see the git history for the details of previous versions.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.