Skip to content

Commit

Permalink
Remove commonjs/esm workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
evert committed Jan 15, 2024
1 parent 01516fc commit 8bccee7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/util.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import { Link, Links } from './links.js';
import * as LinkHeaderImp from 'http-link-header';
import LinkHeader from 'http-link-header';
import { HalResource, HalLink } from 'hal-types';

/** @ts-expect-error ESM weirdness */
const LinkHeader = LinkHeaderImp.default ?? LinkHeaderImp;

export function parseLinkHeader(headers: string[]): Link[] {

const links = LinkHeader.parse(headers.join(','));
Expand Down

0 comments on commit 8bccee7

Please sign in to comment.