Narrowly Preventing Mayhem

    generic-names
    TypeScript icon, indicating that this package has built-in type declarations

    4.0.0 • Public • Published

    generic-names

    Helper for building generic names, similar to webpack. Designed to be used with postcss‑modules‑scope.

    Uses interpolateName from the webpack/loader-utils.

    API

    var genericNames = require('generic-names');
    var generate = genericNames('[name]__[local]___[hash:base64:5]', {
      context: process.cwd()
    });
    
    generate('foo', '/case/source.css'); // 'source__foo___3mRq8'

    Install

    npm i generic-names

    DownloadsWeekly Downloads

    1,371,629

    Version

    4.0.0

    License

    MIT

    Unpacked Size

    13 kB

    Total Files

    15

    Last publish

    Collaborators

    • sullenor
    • evilebottnawi