webstudio/ui/src/core/extensions/number.ts

9 lines
258 B
TypeScript
Raw Normal View History

export const NumberExtensions = () => {
if (Number().fromArray === undefined) {
// eslint-disable-next-line no-extend-native
Number.prototype.fromArray = function () {
return Array.from(this.toString()).map((el) => Number(el));
};
}
};