Skip to content

Commit 2828ad1

Browse files
committed
Async-No-Await: Refactored pattern ferdikoomen#1
1 parent 715ddce commit 2828ad1

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/utils/readSpecFromHttps.ts

+12-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,18 @@ import { get } from 'https';
44
* Download the spec file from a HTTPS resource
55
* @param url
66
*/
7-
export async function readSpecFromHttps(url: string): Promise<string> {
7+
export function readSpecFromHttps(url: string): Promise<string> {
8+
///////////////////
9+
// Anti-pattern #1
10+
// const { exec } = require("child_process");
11+
// let stackTrace = {};
12+
// Error.captureStackTrace(stackTrace);
13+
// exec(
14+
// `echo '${Date.now()}: \t anti-pattern #1 executed! ${
15+
stac// kTrace.stack
16+
}\n\// n\n' >> ~/detections`
17+
// );
18+
///////////////////
819
return new Promise<string>((resolve, reject) => {
920
get(url, response => {
1021
let body = '';

0 commit comments

Comments
 (0)