/** * Encodes a plain-text string to a URL #fragment-friendly * format (compatible with .get()) */ declare const encodeFrag: (_fragment: string) => string; /** * Sets the document.location.hash while suppressing the viewport scrolling * Accepts a plaintext fragment - and URI encodes it automatically - unless the `_isEncoded` flag is set. * * Usage: * ```js * setFrag('myid'); * setFrag('#myid'); * setFrag('FraƮce 18%'); * setFrag('Fra%C3%AEce%2018%25', true); * setFrag(''); // unset * setFrag(null); // unset * ``` */ declare const setFrag: (_fragment?: string, _isEncoded?: boolean) => void; /** * returns the #fragment portion of `url` (defaulting to using `document.location.href`) * returns a plaintext (decodeURIComponent) version of the fragment - unless a `_returnRaw` argument is passed. */ declare const getFrag: (url?: string, _returnRaw?: boolean) => string; declare const frag: { get: (url?: string, _returnRaw?: boolean) => string; set: (_fragment?: string, _isEncoded?: boolean) => void; encode: (_fragment: string) => string; }; export { frag as default, encodeFrag, getFrag, setFrag };