(relatedPaths: string[], json: unknown)
| 1 | import { JSONHeroPath } from "@jsonhero/path"; |
| 2 | |
| 3 | export function isNullable(relatedPaths: string[], json: unknown): boolean { |
| 4 | return relatedPaths.some((path) => { |
| 5 | const heroPath = new JSONHeroPath(path); |
| 6 | |
| 7 | const value = heroPath.first(json); |
| 8 | |
| 9 | return value == null; |
| 10 | }); |
| 11 | } |