npm.io
1.0.1 • Published 4 years ago

serialize-sanity-path

Licence
MIT
Version
1.0.1
Deps
0
Size
6 kB
Vulns
0
Weekly
0

serialize-sanity-path

This utility can be used to serialize a sanity "Path" as a object accessor string. The code was pulled from @sanity/import/src/serializePath.js and converted into TypeScript.

The utility can be useful for Sanity custom inplut plugin developers.

Example

import { serializePath } from 'serialize-sanity-path';
const serialized = serializePath(path);