JSPM

unistyle-flat

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q23971F
  • License MIT

Unnest/flatten a Unistyle Object to a structure which resembles real CSS

Package Exports

  • unistyle-flat

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (unistyle-flat) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

unistyle-flat

Build status NPM version js-xo-style

Unnest/flatten a Unistyle Object to a structure which resembles real CSS

Installation

Install unistyle-flat using npm:

npm install --save unistyle-flat

Usage

Module usage

var flat = require('unistyle-flat');

flat({
    a: {
        ':hover': {
            fontWeight: 'bold'
        }
    }
});
/**
 * {
 *   'a:hover' {
 *     fontWeight: 'bold'
 *   }
 * }
 */

API

flat(obj)

Name Type Description
obj Object A Unistyle Object

Returns: Object, the flattened/unnested object.

License

MIT © Joakim Carlstein