@builder.io/sdk-vue
Version:
Builder.io SDK for Vue
13 lines (12 loc) • 631 B
TypeScript
import type { Search } from '../helpers/search/search';
/**
* Checks the current URL's search parameters to see if it is attempting to
* preview Builder Content.
*
* When called on the client, it uses `window.location.search`.
* When called on the server (SSR), it requires a `search` argument.
*
* @param search - The search parameters to check. Can be a URL string (containing the search parameters), `URLSearchParams`, or a key-value object containing the search parameters.
* @returns `true` if the current page is being previewed, `false` otherwise.
*/
export declare function isPreviewing(search?: Search): boolean;