{"id":20649263,"url":"https://github.com/repalash/ts-browser-helpers","last_synced_at":"2025-04-17T00:59:15.095Z","repository":{"id":84265164,"uuid":"595965698","full_name":"repalash/ts-browser-helpers","owner":"repalash","description":"A collection of utility classes, functions and types for javascript/typescript projects, for use in the browser.","archived":false,"fork":false,"pushed_at":"2025-02-14T18:08:10.000Z","size":563,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T05:51:14.002Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/repalash.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-01T07:12:10.000Z","updated_at":"2025-02-14T18:08:14.000Z","dependencies_parsed_at":"2024-06-27T23:05:22.201Z","dependency_job_id":"7c7cbac5-9ae2-4c2c-a45f-4cc3bad41dd1","html_url":"https://github.com/repalash/ts-browser-helpers","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/repalash%2Fts-browser-helpers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/repalash%2Fts-browser-helpers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/repalash%2Fts-browser-helpers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/repalash%2Fts-browser-helpers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/repalash","download_url":"https://codeload.github.com/repalash/ts-browser-helpers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249296031,"owners_count":21246239,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T17:13:26.771Z","updated_at":"2025-04-17T00:59:15.082Z","avatar_url":"https://github.com/repalash.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TS Browser Helpers\n\nA collection of utility classes, functions and types for javascript/typescript projects, for use in the browser.\n\n## Installation\n\n```bash\nnpm install ts-browser-helpers\n```\n\n## Docs\n\n[API documentation](https://repalash.com/ts-browser-helpers/)\n\n## ArrayBuffer\n\n| Name | Description |\n| ------ | ------ |\n| [TYPED\\_ARRAYS](https://repalash.com/ts-browser-helpers/variables/TYPED_ARRAYS) | Mapping of typed array constructors by name |\n| [arrayBufferToBase64](https://repalash.com/ts-browser-helpers/functions/arrayBufferToBase64) | Convert an ArrayBuffer to Base64 string |\n| [base64ToArrayBuffer](https://repalash.com/ts-browser-helpers/functions/base64ToArrayBuffer) | Convert a Base64 string to ArrayBuffer |\n| [getTypedArray](https://repalash.com/ts-browser-helpers/functions/getTypedArray) | Create a typed array from an ArrayBuffer by name |\n\n## Browser\n\n| Function | Description |\n| ------ | ------ |\n| [blobToDataURL](https://repalash.com/ts-browser-helpers/functions/blobToDataURL) | Convert a blob to a data url. |\n| [downloadBlob](https://repalash.com/ts-browser-helpers/functions/downloadBlob) | Download a blob as a file in the browser. |\n| [downloadFile](https://repalash.com/ts-browser-helpers/functions/downloadFile) | Download a file in the browser. |\n| [uploadFile](https://repalash.com/ts-browser-helpers/functions/uploadFile) | Prompt the user to select a file or directory in the browser. |\n\n## Color\n\n| Function | Description |\n| ------ | ------ |\n| [LinearToSRGB](https://repalash.com/ts-browser-helpers/functions/LinearToSRGB) | Converts a single color channel from the linear color space to sRGB. |\n| [SRGBToLinear](https://repalash.com/ts-browser-helpers/functions/SRGBToLinear) | Converts a single color channel from the sRGB color space to linear. |\n\n## DOM\n\n| Function | Description |\n| ------ | ------ |\n| [createCanvasElement](https://repalash.com/ts-browser-helpers/functions/createCanvasElement) | Creates a HTML canvas element. |\n| [createDiv](https://repalash.com/ts-browser-helpers/functions/createDiv) | Creates an HTML div element. |\n| [createImage](https://repalash.com/ts-browser-helpers/functions/createImage) | Creates a HTML image element from a url. |\n| [createScriptFromURL](https://repalash.com/ts-browser-helpers/functions/createScriptFromURL) | Creates a HTML script element from a url. |\n| [createStyles](https://repalash.com/ts-browser-helpers/functions/createStyles) | Creates a HTML style element with the given styles. |\n\n## Decorators\n\n| Function | Description |\n| ------ | ------ |\n| [onChange](https://repalash.com/ts-browser-helpers/functions/onChange) | Decorator that redefines a property with getter and setter, and calls a function when the property is changed. Parameters passed to the function are the property key and the new value. |\n| [serialize](https://repalash.com/ts-browser-helpers/functions/serialize) | Decorator to mark a class property as serializable using the [Serialization](https://repalash.com/ts-browser-helpers/classes/Serialization) class. |\n\n## Encryption\n\n| Function | Description |\n| ------ | ------ |\n| [aesGcmDecrypt](https://repalash.com/ts-browser-helpers/functions/aesGcmDecrypt) | Decrypts ciphertext encrypted with aesGcmEncrypt() using supplied password. (c) Chris Veness MIT Licence |\n| [aesGcmEncrypt](https://repalash.com/ts-browser-helpers/functions/aesGcmEncrypt) | Encrypts plaintext using AES-GCM with supplied password, for decryption with aesGcmDecrypt(). (c) Chris Veness MIT Licence https://gist.github.com/chrisveness/43bcda93af9f646d083fad678071b90a Modified to work with Uint8Array and string content. |\n\n## HTML To Image\n\n| Function | Description |\n| ------ | ------ |\n| [embedUrlRefs](https://repalash.com/ts-browser-helpers/functions/embedUrlRefs) | Find all URLs in svg, download them and replace with the URL in svg with the downloaded data URLs. |\n| [htmlToCanvas](https://repalash.com/ts-browser-helpers/functions/htmlToCanvas) | Renders an HTML string to a canvas. This is done by first embedding HTML into a svg and then rendering the svg to a canvas. |\n| [htmlToPng](https://repalash.com/ts-browser-helpers/functions/htmlToPng) | Renders an HTML string to a png. This is done by first embedding HTML into a svg and then rendering the svg to a png. |\n| [htmlToSvg](https://repalash.com/ts-browser-helpers/functions/htmlToSvg) | Embeds an HTML string into a svg tag and converts to svg string or svg as data url |\n\n## Images\n\n| Function | Description |\n| ------ | ------ |\n| [imageBitmapToBase64](https://repalash.com/ts-browser-helpers/functions/imageBitmapToBase64) | Convert an image ImageBitmap or CanvasImageSource to a base64 data url. |\n| [imageBitmapToBlob](https://repalash.com/ts-browser-helpers/functions/imageBitmapToBlob) | Convert an image ImageBitmap or CanvasImageSource to a blob. |\n| [imageBitmapToCanvas](https://repalash.com/ts-browser-helpers/functions/imageBitmapToCanvas) | Convert an image ImageBitmap or CanvasImageSource to a new canvas with a max width. Good for resizing images keeping the aspect ratio and generating previews. |\n| [imageToCanvas](https://repalash.com/ts-browser-helpers/functions/imageToCanvas) | Converts an HTML image to a canvas. This creates a new canvas element and draws the image on it. |\n| [imageUrlToImageData](https://repalash.com/ts-browser-helpers/functions/imageUrlToImageData) | Downloads/parse the image from an url/data url and draw to an ImageData object. |\n\n## JS Object\n\n| Name | Description |\n| ------ | ------ |\n| [FnCaller](https://repalash.com/ts-browser-helpers/classes/FnCaller) | calls fn.call(obj) or fn() appropriately |\n| [copyProps](https://repalash.com/ts-browser-helpers/functions/copyProps) | Copy properties from source to dest. Similar to Object.assign, but only copies properties that exist in source, dest and propList. |\n| [deepAccessObject](https://repalash.com/ts-browser-helpers/functions/deepAccessObject) | Access property in an object using a string path. Similar to lodash.get |\n| [getKeyByValue](https://repalash.com/ts-browser-helpers/functions/getKeyByValue) | Find the key of an object with a given value. |\n| [getOrCall](https://repalash.com/ts-browser-helpers/functions/getOrCall) | Get value, but if it is a function, call it with args |\n| [getPropertyDescriptor](https://repalash.com/ts-browser-helpers/functions/getPropertyDescriptor) | Get property descriptor from object or its prototype chain |\n| [isPropertyWritable](https://repalash.com/ts-browser-helpers/functions/isPropertyWritable) | Check if property is writable in object or its prototype chain |\n| [safeSetProperty](https://repalash.com/ts-browser-helpers/functions/safeSetProperty) | Set value only if setter exists |\n\n## Maths\n\n| Function | Description |\n| ------ | ------ |\n| [absMax](https://repalash.com/ts-browser-helpers/functions/absMax) | Returns the number which is larger in absolute value. |\n\n## Other\n\n| Name | Description |\n| ------ | ------ |\n| [Damper](https://repalash.com/ts-browser-helpers/classes/Damper) | The Damper class is a generic second-order critically damped system that does one linear step of the desired length of time. The only parameter is DECAY_MILLISECONDS. This common parameter makes all states converge at the same rate regardless of scale. xNormalization is a number to provide the rough scale of x, such that NIL_SPEED clamping also happens at roughly the same convergence for all states. |\n| [JSUndoManager](https://repalash.com/ts-browser-helpers/classes/JSUndoManager) | Main class JSUndoManager |\n| [PointerDragHelper](https://repalash.com/ts-browser-helpers/classes/PointerDragHelper) | A helper class to handle pointer events and dispatch drag events: `drag`, `dragStart` and `dragEnd` with NDC coordinates and time. |\n| [SimpleEventDispatcher](https://repalash.com/ts-browser-helpers/classes/SimpleEventDispatcher) | A simple event dispatcher with typed event types, see [IEventDispatcher](https://repalash.com/ts-browser-helpers/interfaces/IEventDispatcher). |\n| [IDisposable](https://repalash.com/ts-browser-helpers/interfaces/IDisposable) | Disposable interface for objects that can be disposed. Has a single method `dispose` |\n| [IEvent](https://repalash.com/ts-browser-helpers/interfaces/IEvent) | A simple event interface with typed event types. |\n| [IEventDispatcher](https://repalash.com/ts-browser-helpers/interfaces/IEventDispatcher) | A simple event dispatcher interface with [IEvent](https://repalash.com/ts-browser-helpers/interfaces/IEvent) as event type. |\n| [IJSONSerializable](https://repalash.com/ts-browser-helpers/interfaces/IJSONSerializable) | Interface for objects that can be serialized to JSON, with to and from JSON methods |\n| [ImageCanvasOptions](https://repalash.com/ts-browser-helpers/interfaces/ImageCanvasOptions) | Options for [imageToCanvas](https://repalash.com/ts-browser-helpers/functions/imageToCanvas). |\n| [JSUndoManagerOptions](https://repalash.com/ts-browser-helpers/interfaces/JSUndoManagerOptions) | - |\n| [AnyFunction](https://repalash.com/ts-browser-helpers/type-aliases/AnyFunction) | Type for any function |\n| [AnyOptions](https://repalash.com/ts-browser-helpers/type-aliases/AnyOptions) | Type for any object |\n| [Class](https://repalash.com/ts-browser-helpers/type-aliases/Class) | Generic type for class. |\n| [Fof](https://repalash.com/ts-browser-helpers/type-aliases/Fof) | FoF - Short for `Function of` - a generic type for function |\n| [JSUndoManagerCommand](https://repalash.com/ts-browser-helpers/type-aliases/JSUndoManagerCommand) | - |\n| [JSUndoManagerCommand1](https://repalash.com/ts-browser-helpers/type-aliases/JSUndoManagerCommand1) | - |\n| [JSUndoManagerCommand2](https://repalash.com/ts-browser-helpers/type-aliases/JSUndoManagerCommand2) | - |\n| [PartialPick](https://repalash.com/ts-browser-helpers/type-aliases/PartialPick) | Partial pick type with all keys optional |\n| [PartialRecord](https://repalash.com/ts-browser-helpers/type-aliases/PartialRecord) | Partial record type with all keys optional |\n| [StringKeyOf](https://repalash.com/ts-browser-helpers/type-aliases/StringKeyOf) | Extract keys from object that are strings |\n| [ValOrArr](https://repalash.com/ts-browser-helpers/type-aliases/ValOrArr) | Type for a value of type T or an array of values of type T |\n| [ValOrArrOp](https://repalash.com/ts-browser-helpers/type-aliases/ValOrArrOp) | Type for a value of type `T|undefined` or an array of values of type `T|undefined` |\n| [ValOrFunc](https://repalash.com/ts-browser-helpers/type-aliases/ValOrFunc) | Type for a value of type T or a function that returns a value of type T |\n| [ValOrFuncOp](https://repalash.com/ts-browser-helpers/type-aliases/ValOrFuncOp) | Type for a value of type T|undefined or a function that returns a value of type T|undefined |\n| [blobToImage](https://repalash.com/ts-browser-helpers/functions/blobToImage) | Load a Blob or a file containing an image and return an HTMLImageElement. |\n| [canvasFlipY](https://repalash.com/ts-browser-helpers/functions/canvasFlipY) | Returns a new canvas with the image/canvas-content flipped vertically. Useful for putImageData(as it does not respect scale and translate) and WebGL textures, which are flipped vertically. |\n| [clearBit](https://repalash.com/ts-browser-helpers/functions/clearBit) | Clears the bit at the given position. |\n| [cloneScriptTag](https://repalash.com/ts-browser-helpers/functions/cloneScriptTag) | Clones a script tag. |\n| [colorToDataUrl](https://repalash.com/ts-browser-helpers/functions/colorToDataUrl) | Creates an image data url from a color string. |\n| [findLastIndex](https://repalash.com/ts-browser-helpers/functions/findLastIndex) | like Array.prototype.findIndex but from the end |\n| [getFileHandle](https://repalash.com/ts-browser-helpers/functions/getFileHandle) | Open a handle to an existing file on the local file system. |\n| [getNewFileHandle](https://repalash.com/ts-browser-helpers/functions/getNewFileHandle) | Create a handle to a new (text) file on the local file system. |\n| [imageDataToCanvas](https://repalash.com/ts-browser-helpers/functions/imageDataToCanvas) | Converts an ImageData to a canvas. This creates a new canvas element and draws the image data on it. Image Data can be created from image pixels like from gl.readPixels This can be used to convert a WebGL texture/render target to a canvas/data url. Note: if the output is flipped, use [canvasFlipY](https://repalash.com/ts-browser-helpers/functions/canvasFlipY) after this, like `canvasFlipY(imageDataToCanvas(imageData))` |\n| [includesAll](https://repalash.com/ts-browser-helpers/functions/includesAll) | Returns true if the array includes all the elements of the sub array |\n| [isWebpExportSupported](https://repalash.com/ts-browser-helpers/functions/isWebpExportSupported) | Check if the browser supports exporting to webp, with the canvas.toDataURL('image/webp') method. |\n| [longestCommonPrefix](https://repalash.com/ts-browser-helpers/functions/longestCommonPrefix) | Find the longest common prefix in an array of strings https://stackoverflow.com/questions/68702774/longest-common-prefix-in-javascript |\n| [mobileAndTabletCheck](https://repalash.com/ts-browser-helpers/functions/mobileAndTabletCheck) | Check if the browser is running on a mobile or tablet device. |\n| [objectHasOwn](https://repalash.com/ts-browser-helpers/functions/objectHasOwn) | Check if an object has a property. Same as Object.hasOwn or Object.hasOwnProperty |\n| [objectMap](https://repalash.com/ts-browser-helpers/functions/objectMap) | Execute a function on each property of an object and return the result as a new object This allows in place modification of the object. To create a new object, set inPlace to false, or use [objectMap2](https://repalash.com/ts-browser-helpers/functions/objectMap2) to modify the keys as well Similar to Array.map but for objects. |\n| [objectMap2](https://repalash.com/ts-browser-helpers/functions/objectMap2) | Shorthand for `Object.fromEntries(Object.entries(obj).map(fn))` Similar to [objectMap](https://repalash.com/ts-browser-helpers/functions/objectMap) but uses Object.fromEntries to create the new object, so keys can also be changed. |\n| [onChange2](https://repalash.com/ts-browser-helpers/functions/onChange2) | Similar to [onChange](https://repalash.com/ts-browser-helpers/functions/onChange), but accepts any function and paramType defaults to 'void'. The function is called with no parameters. if 'void' |\n| [onChange3](https://repalash.com/ts-browser-helpers/functions/onChange3) | Similar to [onChange](https://repalash.com/ts-browser-helpers/functions/onChange), but accepts any function and paramType defaults to 'object'. The function is called with an object parameter: `{key, value, oldValue, target}`. |\n| [onChangeDispatchEvent](https://repalash.com/ts-browser-helpers/functions/onChangeDispatchEvent) | Similar to onChange but dispatches an event instead of calling a function. Requires `dispatchEvent` to be defined on the target. |\n| [pathJoin](https://repalash.com/ts-browser-helpers/functions/pathJoin) | Join path parts with separator. Similar to PHP's pathJoin |\n| [prettyScrollbar](https://repalash.com/ts-browser-helpers/functions/prettyScrollbar) | Styles the default scrollbar to be more pretty and less intrusive (especially on dark backgrounds), (similar to MacOS) |\n| [readFile](https://repalash.com/ts-browser-helpers/functions/readFile) | Reads the raw text from a file. |\n| [remoteWorkerURL](https://repalash.com/ts-browser-helpers/functions/remoteWorkerURL) | Returns a blob:// URL which points to a javascript file which will call importScripts with the given URL, to be used for cross-origin workers. https://stackoverflow.com/questions/21913673/execute-web-worker-from-different-origin |\n| [safeReplaceString](https://repalash.com/ts-browser-helpers/functions/safeReplaceString) | Replace a string in a text, optionally prepending, appending, replacing all occurrences, and/or calling a callback if the string is not found |\n| [serializable](https://repalash.com/ts-browser-helpers/functions/serializable) | Decorator to mark a class as serializable using the [Serialization](https://repalash.com/ts-browser-helpers/classes/Serialization) class. |\n| [setInnerHTMLWithScripts](https://repalash.com/ts-browser-helpers/functions/setInnerHTMLWithScripts) | Sets the innerHTML of an element and recreates all script tags so they are executed. |\n| [updateBit](https://repalash.com/ts-browser-helpers/functions/updateBit) | Updates the bit at the given position to the given value. |\n| [uuidV4](https://repalash.com/ts-browser-helpers/functions/uuidV4) | Generate a UUID v4 https://stackoverflow.com/a/53723395/2229899 |\n| [verifyPermission](https://repalash.com/ts-browser-helpers/functions/verifyPermission) | Verify the user has granted permission to read or write to the file, if permission hasn't been granted, request permission. |\n| [wrapThisFunction](https://repalash.com/ts-browser-helpers/functions/wrapThisFunction) | Call f1 before calling f2 Sample usage `const logRender = ()=\u003econsole.log('render') obj.render = wrapThisFunction(logRender, obj.beforeRender) // now calling obj.beforeRender(), will log 'render' and then call obj.beforeRender()` |\n| [wrapThisFunction2](https://repalash.com/ts-browser-helpers/functions/wrapThisFunction2) | Call f1 with the same params as f2 before calling f2 Sample usage `const logRender = ()=\u003econsole.log('render') obj.render = wrapThisFunction(logRender, obj.beforeRender) // now calling obj.beforeRender(), will log 'render' and then call obj.beforeRender()` |\n| [writeFile](https://repalash.com/ts-browser-helpers/functions/writeFile) | Writes the contents to disk. |\n\n## SVGs\n\n| Function | Description |\n| ------ | ------ |\n| [makeColorSvg](https://repalash.com/ts-browser-helpers/functions/makeColorSvg) | Returns a data url for a 16x16 svg rectangle with the given color. |\n| [makeColorSvgCircle](https://repalash.com/ts-browser-helpers/functions/makeColorSvgCircle) | Returns a data url for a 16x16 svg circle with the given color. |\n| [makeTextSvg](https://repalash.com/ts-browser-helpers/functions/makeTextSvg) | Returns a data url for a svg with the given text. |\n| [svgToCanvas](https://repalash.com/ts-browser-helpers/functions/svgToCanvas) | Renders an SVG to a canvas. |\n| [svgToPng](https://repalash.com/ts-browser-helpers/functions/svgToPng) | Renders an SVG to a png data url. |\n\n## Serialization\n\n| Name | Description |\n| ------ | ------ |\n| [Serialization](https://repalash.com/ts-browser-helpers/classes/Serialization) | Serialization class with static methods for serializing and deserializing objects. Properties and classes can be marked serializable by adding [serialize](https://repalash.com/ts-browser-helpers/functions/serialize) and [serializable](https://repalash.com/ts-browser-helpers/functions/serializable) decorators. |\n| [Serializer](https://repalash.com/ts-browser-helpers/interfaces/Serializer) | Serializer interface for primitive, array and struct/custom object types |\n\n## Template Literals\n\n| Function | Description                                                                                                                                                             |\n| ------ |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [css](https://repalash.com/ts-browser-helpers/functions/css) | A template literal tag that does nothing. Useful for syntax highlighting of CSS code.                                                                                   |\n| [glsl](https://repalash.com/ts-browser-helpers/functions/glsl) | A template literal tag that does nothing. Useful for syntax highlighting of GLSL code.                                                                                  |\n| [html](https://repalash.com/ts-browser-helpers/functions/html) | A template literal tag that does nothing. Useful for syntax highlighting of HTML code.                                                                                  |\n| [svgUrl](https://repalash.com/ts-browser-helpers/functions/svgUrl) | Converts an SVG string to data url. This is useful for creating images from SVGs, or using SVGs in CSS. To use put in template string: ```url(${svgUrl`\u003csvg\u003e...\u003c/svg\u003e`})``` |\n\n## Text\n\n| Function | Description |\n| ------ | ------ |\n| [escapeRegExp](https://repalash.com/ts-browser-helpers/functions/escapeRegExp) | Escape a string for use in a regular expression |\n| [getFilenameFromPath](https://repalash.com/ts-browser-helpers/functions/getFilenameFromPath) | Get the filename from a path, similar to PHP's basename() |\n| [parseFileExtension](https://repalash.com/ts-browser-helpers/functions/parseFileExtension) | Parse a file extension from a path |\n| [replaceAll](https://repalash.com/ts-browser-helpers/functions/replaceAll) | Replace all occurrences of a string in another string |\n| [toCamelCase](https://repalash.com/ts-browser-helpers/functions/toCamelCase) | Convert a string to camel case |\n| [toTitleCase](https://repalash.com/ts-browser-helpers/functions/toTitleCase) | Convert a string to title case |\n\n## Time\n\n| Function | Description |\n| ------ | ------ |\n| [now](https://repalash.com/ts-browser-helpers/functions/now) | Returns the current time in milliseconds. If performance.now() is available, it is used, otherwise Date.now() is used. |\n| [timeout](https://repalash.com/ts-browser-helpers/functions/timeout) | Returns a promise that resolves after the given duration. Basically a setTimeout that returns a promise. |\n\n## URL\n\n| Function | Description |\n| ------ | ------ |\n| [getUrlQueryParam](https://repalash.com/ts-browser-helpers/functions/getUrlQueryParam) | Get URL query parameter. If not found, return default value. Similar to PHP's $_GET |\n| [setUrlQueryParam](https://repalash.com/ts-browser-helpers/functions/setUrlQueryParam) | Set URL query parameter. If value is null, remove parameter. Similar to PHP's $_GET |\n\n## Used in\n\n- [WebGi](https://webgi.xyz/docs) - Premium Photo-realistic 3D rendering framework and tools for web applications and online commerce.\n- [ThreePipe](https://threepipe.org/) - A 3D viewer framework for the web.\n- [uiconfig.js](https://repalash.com/uiconfig.js/) - A simple, lightweight and easy to use UI configuration library for javascript/typescript projects.\n\n## References\n\nGenerated with [rollup-library-starter](https://github.com/repalash/rollup-library-starter)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frepalash%2Fts-browser-helpers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frepalash%2Fts-browser-helpers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frepalash%2Fts-browser-helpers/lists"}