# object-string-to-css

> Convert object or strings into valid CSS

Latest version **1.0.0** (published 2018-01-15) · ISC license · 0 weekly downloads

## Install

```sh
npm install object-string-to-css
pnpm add object-string-to-css
yarn add object-string-to-css
bun add object-string-to-css
```

## 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.0 |
| Published | 2018-01-15 |
| First published | 2018-01-15 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | vija02 |

## Links

- npm: https://www.npmjs.com/package/object-string-to-css
- npm.io page: https://npm.io/package/object-string-to-css

## Dependencies (5)

- [is-string](https://npm.io/package/is-string.md) ^1.0.4
- [isnumeric](https://npm.io/package/isnumeric.md) ^0.3.2
- [param-case](https://npm.io/package/param-case.md) ^2.1.1
- [add-px-to-style](https://npm.io/package/add-px-to-style.md) ^1.0.0
- [is-plain-object](https://npm.io/package/is-plain-object.md) ^2.0.4

## Recent versions

- 1.0.0 (latest) — 2018-01-15

## README

# object-string-to-css  [![npm version](https://badge.fury.io/js/object-string-to-css.svg)](https://badge.fury.io/js/object-string-to-css) [![Build Status](https://travis-ci.org/Vija02/object-string-to-css.svg?branch=master)](https://travis-ci.org/Vija02/object-string-to-css)
Convert object or strings into valid CSS

## Install

```
$ npm install --save object-string-to-css
```

## Usage

```js
const objectStringToCSS = require('object-string-to-css');

objectStringToCSS({ 
  width: 100, 
  display: "flex",
  flexDirection: "column",
}, ".class")
/*
.class{
  width: 100px;
  display: flex;
  flex-direction: column;
}
*/
```

## API

### `function (string|object objectToChange, string selector): string`

Throws when
- Invalid JSON
- Invalid Parameter type

## FAQ

### Why?

Makes migrating my projects faster

## Help

If there is any problem with the package, please create an issue on github. Thanks!

---
_Source: https://npm.io/package/object-string-to-css · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
