Skip to content

Commit e90002c

Browse files
Merge pull request #31 from timfish/export-ensureperformance
Export ensurePerformance so PLATFORM.performance can be used without initializing jsdom
2 parents 8bc375d + e0d9400 commit e90002c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import { initializePAL, DOM, PLATFORM, FEATURE, isInitialized } from 'aurelia-pa
44
import { buildPal } from './nodejs-pal-builder';
55
import { MutationNotifier } from './polyfills/mutation-observer';
66

7+
export { ensurePerformance } from './nodejs-pal-builder';
8+
79
/**
810
* Initializes the PAL with the NodeJS-targeted implementation.
911
*/

src/nodejs-pal-builder.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ function patchNotifyChange(window: Window) {
8686
}
8787

8888

89-
function ensurePerformance(window) {
90-
const startOffset = Date.now ? Date.now() : + (new Date);
89+
export function ensurePerformance(window) {
9190
const _entries = [];
9291
const _marksIndex = {};
9392

0 commit comments

Comments
 (0)