UNPKG

@ckeditor/ckeditor5-integrations-common

Version:

This package implements common utility modules for integration projects.

24 lines (23 loc) 679 B
/** * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options */ /** * Maps object values using the provided mapper function. * * @param obj Object to map. * @param mapper Function that maps the object values. * @returns Object with mapped values. * * @example * ```ts * const obj = { * a: 1, * b: 2 * }; * * const mappedObj = mapObjectValues( obj, value => value * 2 ); * // mappedObj is { a: 2, b: 4 } * ``` */ export declare function mapObjectValues<T, U>(obj: Record<string, T>, mapper: (value: T, key: string) => U): Record<string, U>;