(props: T)
| 392 | * @param props |
| 393 | */ |
| 394 | export function removeDataAttributes<T>(props: T): T { |
| 395 | const prefix = /^(data-.*)$/; |
| 396 | let filteredProps = {} as T; |
| 397 | |
| 398 | for (const prop in props) { |
| 399 | if (!prefix.test(prop)) { |
| 400 | filteredProps[prop] = props[prop]; |
| 401 | } |
| 402 | } |
| 403 | |
| 404 | return filteredProps; |
| 405 | } |
| 406 | |
| 407 | // Override base type to change the default. |
| 408 | export interface RACValidation { |
no outgoing calls
no test coverage detected