pc__create_short_names

This is plugin for nmp-package "Post-Compression". He is creates the short names instead of long.

Usage no npm install needed!

<script type="module">
  import pcCreateShortNames from 'https://cdn.skypack.dev/pc__create_short_names';
</script>

README

Creates the short names instead of long

This is plugin for nmp-package "Post-Compression".
He is creates the short names instead of long.

An example of using:

var createShortNames = require("pc__create_short_names");

shortNames = postCompression.build([
    createShortNames()
], uniqueNames);

Example of "uniqueNames":

{
    "class_in_html": {
        "some_class__a": 3,
        "some_class__b": 23
    }
}

Where the number means the number of repetitions. The more repetitions, the more priority to get the short name.

Example of "shortNames":

{
    "class_in_html": {
        "some_class__a": "Bw",
        "some_class__b": "a"
    }
}