Refactor from
const CustomLink: React.PropsWithChildren<CustomLinkProps> = ({
href,
as,
className,
children,
style = {},
...props
}) => {| declare module 'format-currency' { | |
| interface Options { | |
| format?: string; // %s => symbol, %v => value, %c => code | |
| code?: string; | |
| symbol?: string; | |
| locale?: string; | |
| minimumFractionDigits?: number; | |
| maximumFractionDigits?: number; | |
| nanZero?: boolean; | |
| } |
| // tslint:disable:no-console | |
| // In production, we register a service worker to serve assets from local cache. | |
| // This lets the app load faster on subsequent visits in production, and gives | |
| // it offline capabilities. However, it also means that developers (and users) | |
| // will only see deployed updates on the 'N+1' visit to a page, since previously | |
| // cached resources are updated in the background. | |
| // To learn more about the benefits of this model, read https://goo.gl/KwvDNy. | |
| // This link also includes instructions on opting out of this behavior. |
| // Type definitions for get-port 4.0 | |
| // Project: https://github.com/sindresorhus/get-port | |
| // Definitions by: York Yao <https://github.com/plantain-00> | |
| // BendingBender <https://github.com/BendingBender> | |
| // MH Rohman <https://github.com/rohmanhm> | |
| // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | |
| declare module 'get-port' { | |
| type Options = { | |
| port?: number | ReadonlyArray<number>; |
| {"lastUpload":"2020-04-10T07:44:40.507Z","extensionVersion":"v3.4.3"} |
| Verifying my Blockstack ID is secured with the address 1G5KphvEmgjn8TUACct2BNdr4Sj7XhpyD https://explorer.blockstack.org/address/1G5KphvEmgjn8TUACct2BNdr4Sj7XhpyD |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"/> | |
| <title>Declare new variable #jsbench #jsperf</title> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
| <script src="./suite.js"></script> | |
| </head> | |
| <body> | |
| <h1>Open the console to view the results</h1> |
| /((https?):\/\/)?(www.)?[a-z0-9]+(\.[a-z0-9]{1,}){1,3}(:[0-9])?(#?\/?[a-zA-Z0-9#_-]+)*\/?(\?[a-zA-Z0-9-_]+=[a-zA-Z0-9-%]+&?.*)?$/gm |
| open -a "Google Chrome" --args --disable-web-security --user-data-dir | |
| open -a "Microsoft Edge" --args --disable-web-security --user-data-dir |
| export function downloadFileFromBlob(fileName: string, blob: Blob) { | |
| const url = window?.URL?.createObjectURL(blob); | |
| const link = document.createElement("a"); | |
| link.style.display = "none"; | |
| link.href = url; | |
| link.setAttribute("download", fileName); | |
| document.body.appendChild(link); | |
| link.click(); | |
| setTimeout(() => { | |
| document.body.removeChild(link); |
Refactor from
const CustomLink: React.PropsWithChildren<CustomLinkProps> = ({
href,
as,
className,
children,
style = {},
...props
}) => {