octo-deno/make/units.js
Christoph Diehl 240c062a9a Add units.js
2017-04-12 22:18:23 +03:00

13 lines
292 B
JavaScript

make.units = {
lengthUnit: function () {
return random.pick([
"px", "em", "ex", "ch", "rem", "mm", "cm", "in", "pt", "pc", "%"
]);
},
length: function () {
return make.number() + make.lengthUnit();
},
percent: function () {
return make.number() + "%";
},
};