File manager - Edit - /home/c14075/dragmet-ural.ru/www/bitrix/js/landing/ui/component/internal/src/functions/fetch-events-from-options.js
Back
import {Type} from 'main.core'; type Events = { [eventName: string]: () => any, }; type Options = { [key: string]: any, }; export default function fetchEventsFromOptions(options: Options): Events { if (Type.isPlainObject(options)) { return Object.entries(options).reduce((acc, [key, value]) => { if ( Type.isString(key) && key.startsWith('on') && Type.isFunction(value) ) { acc[key] = value; } return acc; }, {}); } return {}; }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.26 |
proxy
|
phpinfo
|
Settings