UNPKG

devextreme

Version:

JavaScript/TypeScript Component Suite for Responsive Web Development

25 lines (24 loc) 647 B
/** * DevExtreme (esm/__internal/core/utils/m_call_once.js) * Version: 25.2.7 * Build date: Tue May 05 2026 * * Copyright (c) 2012 - 2026 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ const callOnce = function(handler) { let result; let wrappedHandler = function() { result = handler.apply(this, arguments); wrappedHandler = function() { return result }; return result }; return function() { return wrappedHandler.apply(this, arguments) } }; export { callOnce };