Splits a path relative to a base path. Returns null if the path is not relative to the base path.
import { splitPath, Path } from "estree-sentry";// returns: ["left", "argument"]splitPath( "$.body.0.expression.left.argument" as Path, "$.body.0.expression" as Path,); Copy
import { splitPath, Path } from "estree-sentry";// returns: ["left", "argument"]splitPath( "$.body.0.expression.left.argument" as Path, "$.body.0.expression" as Path,);
Splits a path relative to a base path. Returns null if the path is not relative to the base path.
Example