You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1 rivi
717 B

  1. {"ast":null,"code":"import clamp from 'lodash-es/clamp';\nexport function range(min, max) {\n if (min === void 0) {\n min = -Infinity;\n }\n\n if (max === void 0) {\n max = Infinity;\n }\n\n return function (proto, key) {\n var alias = \"_\" + key;\n Object.defineProperty(proto, key, {\n get: function get() {\n return this[alias];\n },\n set: function set(val) {\n Object.defineProperty(this, alias, {\n value: clamp(val, min, max),\n enumerable: false,\n writable: true,\n configurable: true\n });\n },\n enumerable: true,\n configurable: true\n });\n };\n}","map":null,"metadata":{},"sourceType":"module"}