Skip to content

Commit

Permalink
Improve exports + API extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
SchoofsKelvin committed Jul 9, 2021
1 parent c9e2202 commit a3a9e56
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions api-extractor.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
"extractorMessageReporting": {
"ae-missing-release-tag": {
"logLevel": "none"
},
"ae-internal-missing-underscore": {
"logLevel": "none",
"addToApiReportFile": false
}
}
},
Expand Down
3 changes: 3 additions & 0 deletions api/ip-matching.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,5 +157,8 @@ export class IPv6 extends IPMatch {
// @public
export function matches(ip: string | IP, target: string | IPMatch): boolean;

// @internal (undocumented)
export function partsToIP(parts: number[]): IP;


```
3 changes: 3 additions & 0 deletions api/untrimmed.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,4 +277,7 @@ export declare class IPv6 extends IPMatch {
*/
export declare function matches(ip: string | IP, target: string | IPMatch): boolean;

/** @internal */
export declare function partsToIP(parts: number[]): IP;

export { }
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import { getMatch, IP, IPMatch } from './ip';

export { getIP, getMatch, IP, IPMask, IPMatch, IPRange, IPSubnetwork, IPv4, IPv6 } from './ip';
export * from './ip';

/**
* Checks whether the given IP matches the given whitelist
Expand Down
1 change: 1 addition & 0 deletions src/ip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,7 @@ export function getIP(input: string | IP): IP | null {
return null;
}

/** @internal */
export function partsToIP(parts: number[]): IP {
if (parts.length !== 4 && parts.length !== 8)
throw new Error(`Expected 4 or 8 parts, got ${parts.length} instead`);
Expand Down

0 comments on commit a3a9e56

Please sign in to comment.