UNPKG

datetime_global

Version:

my Datetime untility, it mixes the Advanced capabilities of Temporal polyfill with the simplicity of Date

10 lines (9 loc) 299 B
export function CallableClass(classObject) { if (new.target) throw new TypeError('Cannot instantiate CallableClass with new'); return new Proxy(classObject, { apply(target, _thisContext, args) { return target.withoutNew?.apply(target, args); }, }); }