react-native-svg
Version:
SVG library for react-native
15 lines (13 loc) • 399 B
text/typescript
export function pickNotNil(object: { [prop: string]: unknown }) {
const result: { [prop: string]: unknown } = {};
for (const key in object) {
if (Object.prototype.hasOwnProperty.call(object, key)) {
const value = object[key];
if (value !== undefined && value !== null) {
result[key] = value;
}
}
}
return result;
}
export const idPattern = /#([^)]+)\)?$/;