JSPM

shorten-css-hex

1.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2516
  • Score
    100M100P100Q176958F
  • License MIT

Shorten CSS hex codes

Package Exports

  • shorten-css-hex

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 (shorten-css-hex) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

shorten-css-hex

NPM version Build Status Coverage Status

Code Climate Dependencies DevDependencies

Shorten CSS hex codes

Install

npm install --save shorten-css-hex

Usage

ES2015

import shortenCssHex from 'shorten-css-hex';

shortenCssHex('#000000');
// => '#000'

shortenCssHex('#AaBBcC');
// => '#abc'

shortencsshex('#112233ff');
// => '#123f'

shortencsshex('#123456');
// => '#123456'

shortencsshex('#123456ff');
// => '#123456ff'

ES5

var shortenCssHex = require('shorten-css-hex');

shortenCssHex('#000000');
// => '#000'

shortenCssHex('#AaBBcC');
// => '#abc'

shortencsshex('#112233ff');
// => '#123f'

shortencsshex('#123456');
// => '#123456'

shortencsshex('#123456ff');
// => '#123456ff'

LICENSE

MIT © Dustin Specker