From 083ae61b5bb87691264ce70330b612881e496f1a Mon Sep 17 00:00:00 2001 From: dgreif Date: Sun, 3 Nov 2024 16:15:29 -0500 Subject: [PATCH] Fix lint in browser example --- packages/examples/browser-example.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/examples/browser-example.ts b/packages/examples/browser-example.ts index ef874391..b4ecbffc 100644 --- a/packages/examples/browser-example.ts +++ b/packages/examples/browser-example.ts @@ -1,9 +1,9 @@ import 'dotenv/config' import { RingApi } from '../ring-client-api' -import { promisify } from 'util' -const fs = require('fs'), - path = require('path'), - express = require('express') // note, express is not installed by default so you will need to run `npm i express` +import fs from 'node:fs/promises' +import path from 'node:path' +// @ts-expect-error express is not installed by default so you will need to run `npm i express` +import express from 'express' /** * This example creates an hls stream which is viewable in a browser @@ -33,8 +33,8 @@ async function example() { ) }) - if (!(await promisify(fs.exists)(publicOutputDirectory))) { - await promisify(fs.mkdir)(publicOutputDirectory) + if (!(await fs.stat(publicOutputDirectory))) { + await fs.mkdir(publicOutputDirectory) } const call = await camera.streamVideo({