Improve import alias

@file/ and @export/ instead of file/ and export/ etc
This commit is contained in:
Dolan Miu
2022-06-26 23:26:42 +01:00
parent c19bc6b4b3
commit 982d923553
380 changed files with 758 additions and 521 deletions

View File

@ -0,0 +1,20 @@
import { nanoid } from "nanoid/non-secure";
let currentCount = 0;
// Twip - twentieths of a point
export const convertMillimetersToTwip = (millimeters: number): number => {
return Math.floor((millimeters / 25.4) * 72 * 20);
};
export const convertInchesToTwip = (inches: number): number => {
return Math.floor(inches * 72 * 20);
};
export const uniqueNumericId = (): number => {
return ++currentCount;
};
export const uniqueId = (): string => {
return nanoid().toLowerCase();
};