| |
return navigator.clipboard.writeText(text);
|
| |
}
|
| |
|
| + |
export function setOpenGraphMetaTag(data: {prop: string, content: string, attr?: string }[]): void {
|
| + |
const elements = Array.from<HTMLElement>(document.querySelectorAll(`meta`));
|
| + |
elements.forEach((element: any) => {
|
| + |
let foundElement = data.find(data => {
|
| + |
return data.prop === element.getAttribute(data.attr || 'property');
|
| + |
});
|
| + |
if (foundElement) element.content = foundElement.content;
|
| + |
});
|
| + |
}
|
| + |
|
| |
export function toWei(amount: string): BigNumber {
|
| |
return parseUnits(amount);
|
| |
}
|