The generateSpacing function accepts only one options parameter used to set the default values. It can have the following properties.
Default options
{ increment:8, base:0, unit:'px',}
Custom defaults
You can define you own defaults but passing the options object into the generate function.
Note: the base value is always added to the final value with the formula base + (input * increment)<unit>, to bypass that you can input -0 as the spacing, and the function will return 0<unit>.
The spacing is the result of the generator function. You have to call it to get an actual distance unit string as output and it can be used throughout your app.
If called without parameters it will return the default values as shown above, but it has 6 valid signatures.
Calculate the default value and returns it as a number.
(asNumber:true):numberspacing(true) // 8
Calculates the value based on the spacing and returns it as a number.