Skip to content

Commit

Permalink
fix: bunk event-stream map function import
Browse files Browse the repository at this point in the history
  • Loading branch information
erunion committed Sep 8, 2023
1 parent b0394d6 commit 1a9f530
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { UrlWithParsedQuery } from 'node:url';

import { format as urlFormat, parse as urlParse } from 'node:url';

import { map as eventStreamMap } from 'event-stream';
import * as eventStream from 'event-stream';
import FormData from 'form-data';
import { stringify as queryStringify } from 'qs';

Expand All @@ -17,6 +17,8 @@ import { targets } from './targets';
export { availableTargets, extname } from './helpers/utils';
export { addTarget, addTargetClient } from './targets';

const { map: eventStreamMap } = eventStream;

/** is this wrong? yes. according to the spec (http://www.softwareishard.com/blog/har-12-spec/#postData) it's technically wrong since `params` and `text` are (by the spec) mutually exclusive. However, in practice, this is not what is often the case.
*
* In general, this library takes a _descriptive_ rather than _perscriptive_ approach (see https://amyrey.web.unc.edu/classes/ling-101-online/tutorials/understanding-prescriptive-vs-descriptive-grammar/).
Expand Down

0 comments on commit 1a9f530

Please sign in to comment.