Nevertheless Published Mine
    Wondering what’s next for npm?Check out our public roadmap! »

    sassy-cast

    2.0.3 • Public • Published

    SassyCast

    GitHub release Travis tests Codacy Badge GitHub issues GitHub pull requests Github last commit

    SassyCast is a simple API for type conversion in Sass. Read API documentation.

    Installation

    npm install sassy-cast
    
    yarn add sassy-cast
    

    Notes

    SassCast has a strict mode in which it will throw errors when failing to cast values (most notably to colors and numbers). You can enable strict-mode with:

    $sc-strict-mode: true;

    In non-strict mode, when a value cannot be converted to a number, SassyCast will warn and return 0. You can change this value with:

    $sc-non-strict-default-number: 0;

    In non-strict mode, when a value cannot be converted to a color, SassyCast will warn and return transparent. You can change this value with:

    $sc-non-strict-default-color: transparent;

    Note that color formats are sometimes converted automatically by Sass depending on the type of syntax used (compressed, expanded, etc.). When casting a color to string, the resulting string can be different from the color input.

    Credits

    Originally created by Hugo Giraudel

    Huge thanks to Marc Mintel for his help.

    Install

    npm i sassy-cast

    DownloadsWeekly Downloads

    37

    Version

    2.0.3

    License

    MIT

    Unpacked Size

    25.8 kB

    Total Files

    5

    Last publish

    Collaborators

    • avatar