UNPKG

jodit

Version:

Jodit is an awesome and useful wysiwyg editor with filebrowser

26 lines (25 loc) 851 B
/*! * Jodit Editor (https://xdsoft.net/jodit/) * Released under MIT see LICENSE.txt in the project root for license information. * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net */ /** * [[include:core/decorators/nonenumerable/README.md]] * @packageDocumentation * @module decorators/nonenumerable */ export const nonenumerable = (target, propertyKey) => { const descriptor = Object.getOwnPropertyDescriptor(target, propertyKey) || {}; if (descriptor.enumerable !== false) { Object.defineProperty(target, propertyKey, { enumerable: false, set(value) { Object.defineProperty(this, propertyKey, { enumerable: false, writable: true, value }); } }); } };