# objss

> Converts JavaScript style objects into CSS-like strings

Latest version **1.0.3** (published 2017-05-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install objss
pnpm add objss
yarn add objss
bun add objss
```

## 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.3 |
| Published | 2017-05-26 |
| First published | 2016-10-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Brent Jackson |
| Maintainers | jxnblk |

## Links

- npm: https://www.npmjs.com/package/objss
- npm.io page: https://npm.io/package/objss

## Dependencies (1)

- [add-px-to-style](https://npm.io/package/add-px-to-style.md) ^1.0.0

## Recent versions

- 1.0.3 (latest) — 2017-05-26
- 1.0.2 — 2017-05-07
- 1.0.1 — 2017-05-07
- 1.0.0 — 2017-05-07
- 1.0.0-1 — 2016-10-14

## README

# objss

Converts JavaScript style objects into CSS-like strings.

```sh
npm i objss
```

```js
const objss = require('objss')

const css = objss({
  margin: 16,
  color: 'tomato'
})
// 'margin:16px;color:tomato;'

const css = objss({
  color: 'tomato',
  ':hover': {
    color: 'green'
  }
})
// 'color:tomato;&:hover{color:green;}'
```

## What is this for?

Sometimes CSS-in-JS solutions require tagged template literals.

JavaScript object literals are often easier to work with.

This can be used in place of tagged template literals.

```js
foo([objss({ color: 'tomato' })])
// The same as foo`color:tomato;`
```

There might be other use-cases as well.

Related:

The reverse of this:

[css-to-object](https://github.com/jxnblk/css-to-object)

MIT License

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