Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit efdae79

Browse files
committed
server-esm: Remove two more straightforward imports
1 parent a8fd3be commit efdae79

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/services/events.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const log = require('./log');
1+
import log from "./log";
22

33
const NOTE_TITLE_CHANGED = "NOTE_TITLE_CHANGED";
44
const ENTER_PROTECTED_SESSION = "ENTER_PROTECTED_SESSION";

src/services/utils.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
"use strict";
22

33
import crypto from "crypto";
4-
const randtoken = require('rand-token').generator({source: 'crypto'});
4+
import { generator } from "rand-token";
55
import unescape from "unescape";
66
import escape from "escape-html";
77
import sanitize from "sanitize-filename";
88
import mimeTypes from "mime-types";
99
import path from "path";
1010

11+
const randtoken = generator({source: 'crypto'});
12+
1113
function newEntityId() {
1214
return randomString(12);
1315
}

0 commit comments

Comments
 (0)