mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-06 07:06:11 +00:00
15 lines
376 B
TypeScript
15 lines
376 B
TypeScript
export function pickNotNil(object: { [prop: string]: unknown }) {
|
|
const result: { [prop: string]: unknown } = {};
|
|
for (const key in object) {
|
|
if (object.hasOwnProperty(key)) {
|
|
const value = object[key];
|
|
if (value !== undefined && value !== null) {
|
|
result[key] = value;
|
|
}
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
export const idPattern = /#([^)]+)\)?$/;
|