• Miguel Rincon's avatar
    Allow spaces between number and unit in formatter · 5ebaa5ca
    Miguel Rincon authored
    This change adds a new configuration option to number formatters to have
    spaces (or other strings) separating the formatted number from units
    
    The new option is called `unitSeparator`, and it can be passed to
    formatters that use units, for example:
    
    ```
    // default behavior
    expect(kilobytes(1, 0)).toBe('1.0kB');
    
    // new behavior
    expect(kilobytes(1, 0, { unitSeparator: ' ' })).toBe('1.0 kB');
    ```
    5ebaa5ca
index_spec.js 7.22 KB