# @j-kallunki/css-in-to-js

> CSS to CSS-in-JS and Styled converter

Latest version **1.0.6** (published 2019-12-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install @j-kallunki/css-in-to-js
pnpm add @j-kallunki/css-in-to-js
yarn add @j-kallunki/css-in-to-js
bun add @j-kallunki/css-in-to-js
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2019-12-30 |
| First published | 2018-11-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 9.7 KB |
| Known vulnerabilities | 0 (+13 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Joonas Kallunki |
| Maintainers | j-kallunki |
| Keywords | css, cssinjs |

## Links

- npm: https://www.npmjs.com/package/@j-kallunki/css-in-to-js
- Repository: https://github.com/J-Kallunki/css-in-to-js
- Homepage: https://github.com/J-Kallunki/css-in-to-js#readme
- Issues: https://github.com/J-Kallunki/css-in-to-js/issues
- npm.io page: https://npm.io/package/@j-kallunki/css-in-to-js

## Dependencies (2)

- [lodash](https://npm.io/package/lodash.md) 4.17.15
- [postcss](https://npm.io/package/postcss.md) 7.0.5

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 1.0.6 (latest) — 2019-12-30
- 1.0.5 — 2019-08-20
- 1.0.4 — 2019-02-05
- 1.0.3 — 2019-02-04
- 1.0.2 — 2018-12-05
- 1.0.1 — 2018-11-15

## README

# @j-kallunki/css-in-to-js

[![travis build](https://img.shields.io/travis/J-Kallunki/css-in-to-js.svg?style=flat-square)](https://travis-ci.org/J-Kallunki/css-in-to-js)
[![codecov coverage](https://img.shields.io/codecov/c/github/J-Kallunki/css-in-to-js.svg?style=flat-square)](https://codecov.io/github/J-Kallunki/css-in-to-js)
[![version](https://img.shields.io/npm/v/@j-kallunki/css-in-to-js.svg?style=flat-square)](http://npm.im/@j-kallunki/css-in-to-js)
[![downloads](https://img.shields.io/npm/dm/@j-kallunki/css-in-to-js.svg?style=flat-square)](http://npm-stat.com/charts.html?package=@j-kallunki/css-in-to-js&from=2015-08-01)
[![MIT License](https://img.shields.io/npm/l/@j-kallunki/css-in-to-js.svg?style=flat-square)](http://opensource.org/licenses/MIT)

Convert any CSS-string to Styled-format object or CSS-in-JS object with CSS-declarations as strings.

## Usage

```bash
yarn add @j-kallunki/css-in-to-js
OR
npm install --save @j-kallunki/css-in-to-js
```
```javascript
import { cssToJs } from '@j-kallunki/css-in-to-js';
const cssObject = cssToJs(cssString);
```

## Settings

### `cssToString`

If you wan't to get CSS-declarations in CSS-string format use:
```javascript
const cssObject = cssToJs(cssString, { cssToString: true })
```

## Tools

### `minifyCss()`

Minify CSS-string

## Acknowledgements

Uses [PostCSS](https://github.com/postcss/postcss) for parsing the CSS.

---
_Source: https://npm.io/package/@j-kallunki/css-in-to-js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
