botframework-webchat-component
Version:
React component of botframework-webchat
14 lines (11 loc) • 406 B
JavaScript
import { isForbiddenPropertyName } from 'botframework-webchat-core';
export default function mapMap(map, mapper) {
return Object.entries(map).reduce((result, [key, value]) => {
if (!isForbiddenPropertyName(key)) {
// Mitigated through denylisting.
// eslint-disable-next-line security/detect-object-injection
result[key] = mapper(value, key);
}
return result;
}, {});
}