(props: T)
| 377 | * @param props |
| 378 | */ |
| 379 | export function removeDataAttributes<T>(props: T): T { |
| 380 | const prefix = /^(data-.*)$/; |
| 381 | let filteredProps = {} as T; |
| 382 | |
| 383 | for (const prop in props) { |
| 384 | if (!prefix.test(prop)) { |
| 385 | filteredProps[prop] = props[prop]; |
| 386 | } |
| 387 | } |
| 388 | |
| 389 | return filteredProps; |
| 390 | } |
| 391 | |
| 392 | // Override base type to change the default. |
| 393 | export interface RACValidation { |
no outgoing calls
no test coverage detected