
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
one-spaces
Advanced tools
A tiny module for making className 😎
npm install one-spaces
Please download this file.
And embed script tag in your document.
<script src="./dist/one-spaces.js"></script>
var el = document.getElementById('my-element');
// arguments
el.className = OneSpaces('cls1', 'cls2', 'cls3');
// array
el.className = OneSpaces(['cls1', 'cls2'], ['cls3']);
// exclude falsy
el.className = OneSpaces('cls1', null, 'cls2', false && 'none', true && 'cls3');
// mix
el.className = OneSpaces(['cls1', 'cls2'], null, 'cls3');
import spaces from 'one-spaces';
export default () => {
return (
<div className={spaces(['cls1', 'cls2'], null, 'cls3')}>
<span>Hello React!</span>
</div>
);
};
Angular and Vue have their own system for className.
Of course you can use this module with them but not recommended.
FAQs
A tiny module for making className 😎
The npm package one-spaces receives a total of 25 weekly downloads. As such, one-spaces popularity was classified as not popular.
We found that one-spaces demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.