🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

cls-str

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cls-str

A super tiny class serializer

latest
Source
npmnpm
Version
0.0.4
Version published
Maintainers
1
Created
Source

cls-str cls-str

A super tiny class serializer

Installation

$ npm install cls-str

Example

import cls from 'cls-str';

cls({ foo:true, bar:false, baz: isTrue() });
//=> 'foo baz'

cls('form-field', { success:  1 > 0 }, [ 'color-whilte', 'bg-black' ], 'dup', 'dup', null);

//=> 'form-field success color-whilte bg-black dup'
import React from 'react';
import cls from 'cls-str';

const TodoItem = ({ text, isDone, disabled }) => (
  <li className={ cls({ item:true, completed:isDone, disabled }) }> 
    <input type="checkbox" disabled={ disabled } checked={ isDone } />
    <label>{ text }</label>
  </li>
);

Contributing

  • Fork this Repo first
  • Clone your Repo
  • Install dependencies by $ npm install
  • Checkout a feature branch
  • Feel free to add your features
  • Make sure your features are fully tested
  • Publish your local branch, Open a pull request
  • Enjoy hacking <3

MIT

This work is licensed under the MIT license.

Keywords

class

FAQs

Package last updated on 23 Jul 2020

Did you know?

Socket

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.

Install

Related posts