<script src="https://unpkg.com/js-path-resolver/dist/index.js"></script> <script> const resolver = jsPathResolver.default; </script>
import resolver from 'js-path-resolver';
const state =lists:todo:caption:'wake up' completed:truecaption:'eat' completed:falseconst info =const value = infoinfo// Remove a field from its parent object or array.
By default, if a path cannot be resolved up to the parent, an exception will be thrown.
// will not throw// will throw
To never throw, use the
onError option. The property
will be set to false instead. However, all mutation operations (delete, get, set) will throw.
const info = // will not throw// info.exists === falseinfo // will throw
See js-path-resolver official documentation for API and tutorials.