eyecite-ts 0.22.0 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -6
- package/dist/annotate/index.d.cts +1 -1
- package/dist/annotate/index.d.mts +1 -1
- package/dist/{citation-CZAaCykt.d.mts → citation-CRrFgXoe.d.cts} +165 -11
- package/dist/citation-CRrFgXoe.d.cts.map +1 -0
- package/dist/{citation-IOfRnNcY.d.cts → citation-QUXhCp8T.d.mts} +165 -11
- package/dist/citation-QUXhCp8T.d.mts.map +1 -0
- package/dist/data/index.cjs +1 -1
- package/dist/data/index.d.cts.map +1 -1
- package/dist/data/index.d.mts.map +1 -1
- package/dist/data/index.mjs +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +39 -4
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +39 -4
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.map +1 -1
- package/dist/knownCodes-CWwNTnJy.mjs +2 -0
- package/dist/knownCodes-CWwNTnJy.mjs.map +1 -0
- package/dist/knownCodes-D8wb047j.cjs +2 -0
- package/dist/knownCodes-D8wb047j.cjs.map +1 -0
- package/dist/reporters-CtCZyH5W.mjs +2 -0
- package/dist/reporters-CtCZyH5W.mjs.map +1 -0
- package/dist/{types-BWxrlc9k.d.cts → types-DQ4QNzN5.d.mts} +2 -2
- package/dist/{types-BWxrlc9k.d.cts.map → types-DQ4QNzN5.d.mts.map} +1 -1
- package/dist/{types-sOqMFEq-.d.mts → types-vQ-tLwml.d.cts} +2 -2
- package/dist/{types-sOqMFEq-.d.mts.map → types-vQ-tLwml.d.cts.map} +1 -1
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.cts +2 -2
- package/dist/utils/index.d.mts +2 -2
- package/dist/utils/index.mjs +1 -1
- package/dist/utils/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/citation-CZAaCykt.d.mts.map +0 -1
- package/dist/citation-IOfRnNcY.d.cts.map +0 -1
- package/dist/knownCodes-Cw5MI48f.cjs +0 -2
- package/dist/knownCodes-Cw5MI48f.cjs.map +0 -1
- package/dist/knownCodes-DcsEnbF3.mjs +0 -2
- package/dist/knownCodes-DcsEnbF3.mjs.map +0 -1
- package/dist/reporters-CZoC98-L.mjs +0 -2
- package/dist/reporters-CZoC98-L.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -317,19 +317,31 @@ if (cite.type === "case") {
|
|
|
317
317
|
The `eyecite-ts/utils` entry point provides composable post-processing:
|
|
318
318
|
|
|
319
319
|
```typescript
|
|
320
|
+
import { extractCitations, isCaseCitation } from "eyecite-ts"
|
|
320
321
|
import { groupByCase, toBluebook, toReporterKey, getSurroundingContext } from "eyecite-ts/utils"
|
|
321
322
|
|
|
323
|
+
const citations = extractCitations(text, { resolve: true })
|
|
324
|
+
|
|
322
325
|
// Group citations by case (parallel + short-form → full)
|
|
326
|
+
// Requires resolved citations — pass `{ resolve: true }` to extractCitations.
|
|
323
327
|
const groups = groupByCase(citations)
|
|
324
328
|
|
|
325
|
-
// Format as Bluebook citation string
|
|
326
|
-
const formatted = toBluebook(
|
|
329
|
+
// Format as Bluebook citation string (any Citation)
|
|
330
|
+
const formatted = toBluebook(citations[0])
|
|
327
331
|
|
|
328
|
-
// Get canonical reporter key for deduplication
|
|
329
|
-
const
|
|
332
|
+
// Get canonical reporter key for deduplication (full case citations only)
|
|
333
|
+
const first = citations[0]
|
|
334
|
+
if (isCaseCitation(first)) {
|
|
335
|
+
const key = toReporterKey(first) // "500 F.2d 123"
|
|
336
|
+
}
|
|
330
337
|
|
|
331
|
-
// Extract surrounding sentence context
|
|
332
|
-
const
|
|
338
|
+
// Extract surrounding sentence context (pass a {start, end} span, not the citation)
|
|
339
|
+
const cite = citations[0]
|
|
340
|
+
const ctx = getSurroundingContext(
|
|
341
|
+
text,
|
|
342
|
+
{ start: cite.span.originalStart, end: cite.span.originalEnd },
|
|
343
|
+
{ maxLength: 100 },
|
|
344
|
+
)
|
|
333
345
|
```
|
|
334
346
|
|
|
335
347
|
## Type System
|
|
@@ -59,11 +59,14 @@ declare function parsePincite(raw: string): PinciteInfo | null;
|
|
|
59
59
|
/**
|
|
60
60
|
* Date Parsing Utilities for Legal Citations
|
|
61
61
|
*
|
|
62
|
-
* Parses dates from parentheticals in legal citations. Supports
|
|
63
|
-
* 1. Abbreviated month: "Jan. 15, 2020"
|
|
64
|
-
* 2. Full month: "January 15, 2020"
|
|
65
|
-
* 3.
|
|
66
|
-
* 4.
|
|
62
|
+
* Parses dates from parentheticals in legal citations. Supports several formats:
|
|
63
|
+
* 1. Abbreviated month, US order: "Jan. 15, 2020", "Jan.15, 1990" (no space after period; #554)
|
|
64
|
+
* 2. Full month, US order: "January 15, 2020"
|
|
65
|
+
* 3. ISO 8601: "2020-06-15" (#554)
|
|
66
|
+
* 4. ISO with slashes: "2020/06/15" (#554)
|
|
67
|
+
* 5. Numeric US: "1/15/2020"
|
|
68
|
+
* 6. European order: "15 June 2020", "15 Jun 2020" (#554)
|
|
69
|
+
* 7. Year-only: "2020"
|
|
67
70
|
*
|
|
68
71
|
* @module extract/dates
|
|
69
72
|
*/
|
|
@@ -307,12 +310,51 @@ interface StatutesAtLargeComponentSpans {
|
|
|
307
310
|
year?: Span;
|
|
308
311
|
signal?: Span;
|
|
309
312
|
}
|
|
313
|
+
/**
|
|
314
|
+
* Component spans for federal rule citations (type: "federalRule"). #576
|
|
315
|
+
*/
|
|
316
|
+
interface FederalRuleComponentSpans {
|
|
317
|
+
ruleSet?: Span;
|
|
318
|
+
rule?: Span;
|
|
319
|
+
subsection?: Span;
|
|
320
|
+
signal?: Span;
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Component spans for Restatement citations (type: "restatement"). #578
|
|
324
|
+
*/
|
|
325
|
+
interface RestatementComponentSpans {
|
|
326
|
+
edition?: Span;
|
|
327
|
+
subject?: Span;
|
|
328
|
+
section?: Span;
|
|
329
|
+
subsection?: Span;
|
|
330
|
+
signal?: Span;
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Component spans for treatise citations (type: "treatise"). #579
|
|
334
|
+
*/
|
|
335
|
+
interface TreatiseComponentSpans {
|
|
336
|
+
volume?: Span;
|
|
337
|
+
title?: Span;
|
|
338
|
+
section?: Span;
|
|
339
|
+
year?: Span;
|
|
340
|
+
signal?: Span;
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Component spans for A.L.R. annotation citations (type: "annotation"). #581
|
|
344
|
+
*/
|
|
345
|
+
interface AnnotationComponentSpans {
|
|
346
|
+
volume?: Span;
|
|
347
|
+
series?: Span;
|
|
348
|
+
page?: Span;
|
|
349
|
+
year?: Span;
|
|
350
|
+
signal?: Span;
|
|
351
|
+
}
|
|
310
352
|
//#endregion
|
|
311
353
|
//#region src/types/citation.d.ts
|
|
312
354
|
/**
|
|
313
355
|
* Citation type discriminator for type-safe pattern matching.
|
|
314
356
|
*/
|
|
315
|
-
type CitationType = "case" | "docket" | "statute" | "journal" | "neutral" | "publicLaw" | "federalRegister" | "statutesAtLarge" | "constitutional" | "id" | "supra" | "shortFormCase";
|
|
357
|
+
type CitationType = "case" | "docket" | "statute" | "journal" | "neutral" | "publicLaw" | "federalRegister" | "statutesAtLarge" | "constitutional" | "federalRule" | "restatement" | "treatise" | "annotation" | "id" | "supra" | "shortFormCase";
|
|
316
358
|
/**
|
|
317
359
|
* Warning generated during citation parsing.
|
|
318
360
|
*/
|
|
@@ -667,6 +709,18 @@ interface StatuteCitation extends CitationBase {
|
|
|
667
709
|
chapter?: string;
|
|
668
710
|
/** Subsection/pincite chain, e.g. "(a)(1)(A)" */
|
|
669
711
|
subsection?: string;
|
|
712
|
+
/**
|
|
713
|
+
* Structured representation of a subsection range like `(a)-(b)` /
|
|
714
|
+
* `(9)—(16)`. Populated only when the cited subsection chain ends with
|
|
715
|
+
* a hyphen/en-dash/em-dash followed by another paren group. `start` is
|
|
716
|
+
* mirrored on the `subsection` field for backward compatibility, so
|
|
717
|
+
* existing consumers reading `subsection` still see the first endpoint.
|
|
718
|
+
* (#591)
|
|
719
|
+
*/
|
|
720
|
+
subsectionRange?: {
|
|
721
|
+
start: string;
|
|
722
|
+
end: string;
|
|
723
|
+
};
|
|
670
724
|
/** 2-letter state code or "US" when unambiguously identified */
|
|
671
725
|
jurisdiction?: string;
|
|
672
726
|
/**
|
|
@@ -834,6 +888,106 @@ interface StatutesAtLargeCitation extends CitationBase {
|
|
|
834
888
|
spans?: StatutesAtLargeComponentSpans;
|
|
835
889
|
}
|
|
836
890
|
/**
|
|
891
|
+
* Federal Rules of Procedure citation (#576).
|
|
892
|
+
*
|
|
893
|
+
* Covers the four primary federal rule sets (civil, criminal, evidence,
|
|
894
|
+
* appellate) plus bankruptcy. Both the abbreviated Bluebook form
|
|
895
|
+
* (`Fed. R. Civ. P. 56`) and the spelled-out form
|
|
896
|
+
* (`Federal Rule of Civil Procedure 56`) parse to the same shape.
|
|
897
|
+
*
|
|
898
|
+
* @example "Fed. R. Civ. P. 56" → { ruleSet: "civil", rule: "56" }
|
|
899
|
+
* @example "Fed. R. Crim. P. 12(b)" → { ruleSet: "criminal", rule: "12", subsection: "(b)" }
|
|
900
|
+
* @example "Fed. R. Evid. 401" → { ruleSet: "evidence", rule: "401" }
|
|
901
|
+
* @example "Fed. R. App. P. 4(a)" → { ruleSet: "appellate", rule: "4", subsection: "(a)" }
|
|
902
|
+
* @example "Fed. R. Bankr. P. 7001" → { ruleSet: "bankruptcy", rule: "7001" }
|
|
903
|
+
*/
|
|
904
|
+
interface FederalRuleCitation extends CitationBase {
|
|
905
|
+
type: "federalRule";
|
|
906
|
+
/** Which rule set the citation refers to */
|
|
907
|
+
ruleSet: "civil" | "criminal" | "evidence" | "appellate" | "bankruptcy";
|
|
908
|
+
/** Rule number (string to preserve leading zeros / non-numeric suffixes) */
|
|
909
|
+
rule: string;
|
|
910
|
+
/** Subsection chain (e.g., "(b)(6)") — undefined when not cited */
|
|
911
|
+
subsection?: string;
|
|
912
|
+
/** Precise text positions for each parsed component of this citation. */
|
|
913
|
+
spans?: FederalRuleComponentSpans;
|
|
914
|
+
}
|
|
915
|
+
/**
|
|
916
|
+
* Restatement citation (#578).
|
|
917
|
+
*
|
|
918
|
+
* Restatements of the Law are secondary legal authority published by the
|
|
919
|
+
* American Law Institute. Citations follow the Bluebook form `Restatement
|
|
920
|
+
* (Edition) of Subject § Section`.
|
|
921
|
+
*
|
|
922
|
+
* @example "Restatement (Second) of Torts § 402A"
|
|
923
|
+
* → { edition: "Second", subject: "Torts", section: "402A" }
|
|
924
|
+
* @example "Restatement (Third) of the Law Governing Lawyers § 1"
|
|
925
|
+
* → { edition: "Third", subject: "the Law Governing Lawyers", section: "1" }
|
|
926
|
+
*/
|
|
927
|
+
interface RestatementCitation extends CitationBase {
|
|
928
|
+
type: "restatement";
|
|
929
|
+
/** Restatement edition (First, Second, Third, Fourth) */
|
|
930
|
+
edition: "First" | "Second" | "Third" | "Fourth";
|
|
931
|
+
/** Subject matter (e.g., "Torts", "Contracts", "the Law Governing Lawyers") */
|
|
932
|
+
subject: string;
|
|
933
|
+
/** Section number (string to preserve letter suffixes like "402A") */
|
|
934
|
+
section: string;
|
|
935
|
+
/** Subsection chain (e.g., "(1)(b)") — undefined when not cited */
|
|
936
|
+
subsection?: string;
|
|
937
|
+
/** Precise text positions for each parsed component of this citation. */
|
|
938
|
+
spans?: RestatementComponentSpans;
|
|
939
|
+
}
|
|
940
|
+
/**
|
|
941
|
+
* Legal treatise citation (#579).
|
|
942
|
+
*
|
|
943
|
+
* Treatises are multi-volume secondary authorities (Wright & Miller,
|
|
944
|
+
* Williston, Moore's, Nimmer, Corbin, Witkin, etc.). Citations are
|
|
945
|
+
* heterogeneous, but the common pattern is `Volume Author/Title § Section`.
|
|
946
|
+
*
|
|
947
|
+
* @example "5 Wright & Miller, Federal Practice and Procedure § 1290"
|
|
948
|
+
* → { volume: 5, title: "Wright & Miller, Federal Practice and Procedure", section: "1290" }
|
|
949
|
+
* @example "1 Nimmer on Copyright § 5.05[A]"
|
|
950
|
+
* → { volume: 1, title: "Nimmer on Copyright", section: "5.05[A]" }
|
|
951
|
+
*/
|
|
952
|
+
interface TreatiseCitation extends CitationBase {
|
|
953
|
+
type: "treatise";
|
|
954
|
+
/** Volume number (string for hyphenated volumes) */
|
|
955
|
+
volume: number | string;
|
|
956
|
+
/** Title/author body as it appears in the citation */
|
|
957
|
+
title: string;
|
|
958
|
+
/** Section number / locator (string to preserve dots and bracketed suffixes) */
|
|
959
|
+
section: string;
|
|
960
|
+
/** Edition + year, when present in trailing parenthetical (e.g., "5th ed. 2008") */
|
|
961
|
+
edition?: string;
|
|
962
|
+
/** Publication year (if extracted from parenthetical) */
|
|
963
|
+
year?: number;
|
|
964
|
+
/** Precise text positions for each parsed component of this citation. */
|
|
965
|
+
spans?: TreatiseComponentSpans;
|
|
966
|
+
}
|
|
967
|
+
/**
|
|
968
|
+
* Annotation citation (#581).
|
|
969
|
+
*
|
|
970
|
+
* The American Law Reports (A.L.R.) series publishes annotations on
|
|
971
|
+
* narrow legal issues — these look like case citations
|
|
972
|
+
* (`100 A.L.R.2d 1234`) but are secondary authority, not case law.
|
|
973
|
+
*
|
|
974
|
+
* @example "100 A.L.R.2d 1234" → { series: "A.L.R.2d", volume: 100, page: 1234 }
|
|
975
|
+
* @example "23 A.L.R. Fed. 3d 456" → { series: "A.L.R. Fed. 3d", volume: 23, page: 456 }
|
|
976
|
+
*/
|
|
977
|
+
interface AnnotationCitation extends CitationBase {
|
|
978
|
+
type: "annotation";
|
|
979
|
+
/** A.L.R. series identifier (`A.L.R.`, `A.L.R.2d`, `A.L.R. Fed.`, etc.) */
|
|
980
|
+
series: string;
|
|
981
|
+
/** Volume number */
|
|
982
|
+
volume: number;
|
|
983
|
+
/** Page number where the annotation begins */
|
|
984
|
+
page: number;
|
|
985
|
+
/** Publication year (if extracted from parenthetical) */
|
|
986
|
+
year?: number;
|
|
987
|
+
/** Precise text positions for each parsed component of this citation. */
|
|
988
|
+
spans?: AnnotationComponentSpans;
|
|
989
|
+
}
|
|
990
|
+
/**
|
|
837
991
|
* Docket-number-only case citation (no traditional reporter assignment).
|
|
838
992
|
*
|
|
839
993
|
* Used for very recent decisions identified by docket/slip number, common for:
|
|
@@ -1079,16 +1233,16 @@ interface ShortFormCaseCitation extends CitationBase {
|
|
|
1079
1233
|
* // ...
|
|
1080
1234
|
* }
|
|
1081
1235
|
*/
|
|
1082
|
-
type Citation = FullCaseCitation | DocketCitation | StatuteCitation | JournalCitation | NeutralCitation | PublicLawCitation | FederalRegisterCitation | StatutesAtLargeCitation | ConstitutionalCitation | IdCitation | SupraCitation | ShortFormCaseCitation;
|
|
1236
|
+
type Citation = FullCaseCitation | DocketCitation | StatuteCitation | JournalCitation | NeutralCitation | PublicLawCitation | FederalRegisterCitation | StatutesAtLargeCitation | ConstitutionalCitation | FederalRuleCitation | RestatementCitation | TreatiseCitation | AnnotationCitation | IdCitation | SupraCitation | ShortFormCaseCitation;
|
|
1083
1237
|
/**
|
|
1084
1238
|
* Citation type discriminators grouped by category.
|
|
1085
1239
|
*/
|
|
1086
|
-
type FullCitationType = "case" | "docket" | "statute" | "journal" | "neutral" | "publicLaw" | "federalRegister" | "statutesAtLarge" | "constitutional";
|
|
1240
|
+
type FullCitationType = "case" | "docket" | "statute" | "journal" | "neutral" | "publicLaw" | "federalRegister" | "statutesAtLarge" | "constitutional" | "federalRule" | "restatement" | "treatise" | "annotation";
|
|
1087
1241
|
type ShortFormCitationType = "id" | "supra" | "shortFormCase";
|
|
1088
1242
|
/**
|
|
1089
1243
|
* Union of all full citation types (not short-form references).
|
|
1090
1244
|
*/
|
|
1091
|
-
type FullCitation = FullCaseCitation | DocketCitation | StatuteCitation | JournalCitation | NeutralCitation | PublicLawCitation | FederalRegisterCitation | StatutesAtLargeCitation | ConstitutionalCitation;
|
|
1245
|
+
type FullCitation = FullCaseCitation | DocketCitation | StatuteCitation | JournalCitation | NeutralCitation | PublicLawCitation | FederalRegisterCitation | StatutesAtLargeCitation | ConstitutionalCitation | FederalRuleCitation | RestatementCitation | TreatiseCitation | AnnotationCitation;
|
|
1092
1246
|
/**
|
|
1093
1247
|
* Union of all short-form citation types (Id., supra, short-form case).
|
|
1094
1248
|
*/
|
|
@@ -1111,5 +1265,5 @@ type CitationOfType<T extends CitationType> = Extract<Citation, {
|
|
|
1111
1265
|
*/
|
|
1112
1266
|
type ExtractorMap = { [K in FullCitationType]: CitationOfType<K> };
|
|
1113
1267
|
//#endregion
|
|
1114
|
-
export {
|
|
1115
|
-
//# sourceMappingURL=citation-
|
|
1268
|
+
export { SupraCitation as A, PublicLawComponentSpans as B, RestatementCitation as C, StatuteCitation as D, ShortFormCitationType as E, ConstitutionalComponentSpans as F, Span as G, StatuteComponentSpans as H, FederalRegisterComponentSpans as I, PinciteInfo as J, TransformationMap as K, FederalRuleComponentSpans as L, Warning as M, AnnotationComponentSpans as N, StatutesAtLargeCitation as O, CaseComponentSpans as P, JournalComponentSpans as R, PublicLawCitation as S, ShortFormCitation as T, StatutesAtLargeComponentSpans as U, RestatementComponentSpans as V, TreatiseComponentSpans as W, parsePincite as Y, IdCitation as _, CitationSignal as a, Parenthetical as b, CourtInference as c, FederalRegisterCitation as d, FederalRuleCitation as f, HistorySignal as g, FullCitationType as h, CitationOfType as i, TreatiseCitation as j, SubsequentHistoryEntry as k, DocketCitation as l, FullCitation as m, Citation as n, CitationType as o, FullCaseCitation as p, spanFromGroupIndex as q, CitationBase as r, ConstitutionalCitation as s, AnnotationCitation as t, ExtractorMap as u, JournalCitation as v, ShortFormCaseCitation as w, ParentheticalType as x, NeutralCitation as y, NeutralComponentSpans as z };
|
|
1269
|
+
//# sourceMappingURL=citation-CRrFgXoe.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"citation-CRrFgXoe.d.cts","names":[],"sources":["../src/extract/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A,GACA,mBAAA,GACA,gBAAA,GACA,kBAAA;;;;KAKQ,iBAAA,GAAoB,UAAA,GAAa,aAAA,GAAgB,qBAAA;;;;;;;;;;KAWjD,cAAA,WAAyB,YAAA,IAAgB,OAAA,CAAQ,QAAA;EAAY,IAAA,EAAM,CAAA;AAAA;;;;AAlC/E;KAwCY,YAAA,WACJ,gBAAA,GAAmB,cAAA,CAAe,CAAA"}
|
|
@@ -59,11 +59,14 @@ declare function parsePincite(raw: string): PinciteInfo | null;
|
|
|
59
59
|
/**
|
|
60
60
|
* Date Parsing Utilities for Legal Citations
|
|
61
61
|
*
|
|
62
|
-
* Parses dates from parentheticals in legal citations. Supports
|
|
63
|
-
* 1. Abbreviated month: "Jan. 15, 2020"
|
|
64
|
-
* 2. Full month: "January 15, 2020"
|
|
65
|
-
* 3.
|
|
66
|
-
* 4.
|
|
62
|
+
* Parses dates from parentheticals in legal citations. Supports several formats:
|
|
63
|
+
* 1. Abbreviated month, US order: "Jan. 15, 2020", "Jan.15, 1990" (no space after period; #554)
|
|
64
|
+
* 2. Full month, US order: "January 15, 2020"
|
|
65
|
+
* 3. ISO 8601: "2020-06-15" (#554)
|
|
66
|
+
* 4. ISO with slashes: "2020/06/15" (#554)
|
|
67
|
+
* 5. Numeric US: "1/15/2020"
|
|
68
|
+
* 6. European order: "15 June 2020", "15 Jun 2020" (#554)
|
|
69
|
+
* 7. Year-only: "2020"
|
|
67
70
|
*
|
|
68
71
|
* @module extract/dates
|
|
69
72
|
*/
|
|
@@ -307,12 +310,51 @@ interface StatutesAtLargeComponentSpans {
|
|
|
307
310
|
year?: Span;
|
|
308
311
|
signal?: Span;
|
|
309
312
|
}
|
|
313
|
+
/**
|
|
314
|
+
* Component spans for federal rule citations (type: "federalRule"). #576
|
|
315
|
+
*/
|
|
316
|
+
interface FederalRuleComponentSpans {
|
|
317
|
+
ruleSet?: Span;
|
|
318
|
+
rule?: Span;
|
|
319
|
+
subsection?: Span;
|
|
320
|
+
signal?: Span;
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Component spans for Restatement citations (type: "restatement"). #578
|
|
324
|
+
*/
|
|
325
|
+
interface RestatementComponentSpans {
|
|
326
|
+
edition?: Span;
|
|
327
|
+
subject?: Span;
|
|
328
|
+
section?: Span;
|
|
329
|
+
subsection?: Span;
|
|
330
|
+
signal?: Span;
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Component spans for treatise citations (type: "treatise"). #579
|
|
334
|
+
*/
|
|
335
|
+
interface TreatiseComponentSpans {
|
|
336
|
+
volume?: Span;
|
|
337
|
+
title?: Span;
|
|
338
|
+
section?: Span;
|
|
339
|
+
year?: Span;
|
|
340
|
+
signal?: Span;
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Component spans for A.L.R. annotation citations (type: "annotation"). #581
|
|
344
|
+
*/
|
|
345
|
+
interface AnnotationComponentSpans {
|
|
346
|
+
volume?: Span;
|
|
347
|
+
series?: Span;
|
|
348
|
+
page?: Span;
|
|
349
|
+
year?: Span;
|
|
350
|
+
signal?: Span;
|
|
351
|
+
}
|
|
310
352
|
//#endregion
|
|
311
353
|
//#region src/types/citation.d.ts
|
|
312
354
|
/**
|
|
313
355
|
* Citation type discriminator for type-safe pattern matching.
|
|
314
356
|
*/
|
|
315
|
-
type CitationType = "case" | "docket" | "statute" | "journal" | "neutral" | "publicLaw" | "federalRegister" | "statutesAtLarge" | "constitutional" | "id" | "supra" | "shortFormCase";
|
|
357
|
+
type CitationType = "case" | "docket" | "statute" | "journal" | "neutral" | "publicLaw" | "federalRegister" | "statutesAtLarge" | "constitutional" | "federalRule" | "restatement" | "treatise" | "annotation" | "id" | "supra" | "shortFormCase";
|
|
316
358
|
/**
|
|
317
359
|
* Warning generated during citation parsing.
|
|
318
360
|
*/
|
|
@@ -667,6 +709,18 @@ interface StatuteCitation extends CitationBase {
|
|
|
667
709
|
chapter?: string;
|
|
668
710
|
/** Subsection/pincite chain, e.g. "(a)(1)(A)" */
|
|
669
711
|
subsection?: string;
|
|
712
|
+
/**
|
|
713
|
+
* Structured representation of a subsection range like `(a)-(b)` /
|
|
714
|
+
* `(9)—(16)`. Populated only when the cited subsection chain ends with
|
|
715
|
+
* a hyphen/en-dash/em-dash followed by another paren group. `start` is
|
|
716
|
+
* mirrored on the `subsection` field for backward compatibility, so
|
|
717
|
+
* existing consumers reading `subsection` still see the first endpoint.
|
|
718
|
+
* (#591)
|
|
719
|
+
*/
|
|
720
|
+
subsectionRange?: {
|
|
721
|
+
start: string;
|
|
722
|
+
end: string;
|
|
723
|
+
};
|
|
670
724
|
/** 2-letter state code or "US" when unambiguously identified */
|
|
671
725
|
jurisdiction?: string;
|
|
672
726
|
/**
|
|
@@ -834,6 +888,106 @@ interface StatutesAtLargeCitation extends CitationBase {
|
|
|
834
888
|
spans?: StatutesAtLargeComponentSpans;
|
|
835
889
|
}
|
|
836
890
|
/**
|
|
891
|
+
* Federal Rules of Procedure citation (#576).
|
|
892
|
+
*
|
|
893
|
+
* Covers the four primary federal rule sets (civil, criminal, evidence,
|
|
894
|
+
* appellate) plus bankruptcy. Both the abbreviated Bluebook form
|
|
895
|
+
* (`Fed. R. Civ. P. 56`) and the spelled-out form
|
|
896
|
+
* (`Federal Rule of Civil Procedure 56`) parse to the same shape.
|
|
897
|
+
*
|
|
898
|
+
* @example "Fed. R. Civ. P. 56" → { ruleSet: "civil", rule: "56" }
|
|
899
|
+
* @example "Fed. R. Crim. P. 12(b)" → { ruleSet: "criminal", rule: "12", subsection: "(b)" }
|
|
900
|
+
* @example "Fed. R. Evid. 401" → { ruleSet: "evidence", rule: "401" }
|
|
901
|
+
* @example "Fed. R. App. P. 4(a)" → { ruleSet: "appellate", rule: "4", subsection: "(a)" }
|
|
902
|
+
* @example "Fed. R. Bankr. P. 7001" → { ruleSet: "bankruptcy", rule: "7001" }
|
|
903
|
+
*/
|
|
904
|
+
interface FederalRuleCitation extends CitationBase {
|
|
905
|
+
type: "federalRule";
|
|
906
|
+
/** Which rule set the citation refers to */
|
|
907
|
+
ruleSet: "civil" | "criminal" | "evidence" | "appellate" | "bankruptcy";
|
|
908
|
+
/** Rule number (string to preserve leading zeros / non-numeric suffixes) */
|
|
909
|
+
rule: string;
|
|
910
|
+
/** Subsection chain (e.g., "(b)(6)") — undefined when not cited */
|
|
911
|
+
subsection?: string;
|
|
912
|
+
/** Precise text positions for each parsed component of this citation. */
|
|
913
|
+
spans?: FederalRuleComponentSpans;
|
|
914
|
+
}
|
|
915
|
+
/**
|
|
916
|
+
* Restatement citation (#578).
|
|
917
|
+
*
|
|
918
|
+
* Restatements of the Law are secondary legal authority published by the
|
|
919
|
+
* American Law Institute. Citations follow the Bluebook form `Restatement
|
|
920
|
+
* (Edition) of Subject § Section`.
|
|
921
|
+
*
|
|
922
|
+
* @example "Restatement (Second) of Torts § 402A"
|
|
923
|
+
* → { edition: "Second", subject: "Torts", section: "402A" }
|
|
924
|
+
* @example "Restatement (Third) of the Law Governing Lawyers § 1"
|
|
925
|
+
* → { edition: "Third", subject: "the Law Governing Lawyers", section: "1" }
|
|
926
|
+
*/
|
|
927
|
+
interface RestatementCitation extends CitationBase {
|
|
928
|
+
type: "restatement";
|
|
929
|
+
/** Restatement edition (First, Second, Third, Fourth) */
|
|
930
|
+
edition: "First" | "Second" | "Third" | "Fourth";
|
|
931
|
+
/** Subject matter (e.g., "Torts", "Contracts", "the Law Governing Lawyers") */
|
|
932
|
+
subject: string;
|
|
933
|
+
/** Section number (string to preserve letter suffixes like "402A") */
|
|
934
|
+
section: string;
|
|
935
|
+
/** Subsection chain (e.g., "(1)(b)") — undefined when not cited */
|
|
936
|
+
subsection?: string;
|
|
937
|
+
/** Precise text positions for each parsed component of this citation. */
|
|
938
|
+
spans?: RestatementComponentSpans;
|
|
939
|
+
}
|
|
940
|
+
/**
|
|
941
|
+
* Legal treatise citation (#579).
|
|
942
|
+
*
|
|
943
|
+
* Treatises are multi-volume secondary authorities (Wright & Miller,
|
|
944
|
+
* Williston, Moore's, Nimmer, Corbin, Witkin, etc.). Citations are
|
|
945
|
+
* heterogeneous, but the common pattern is `Volume Author/Title § Section`.
|
|
946
|
+
*
|
|
947
|
+
* @example "5 Wright & Miller, Federal Practice and Procedure § 1290"
|
|
948
|
+
* → { volume: 5, title: "Wright & Miller, Federal Practice and Procedure", section: "1290" }
|
|
949
|
+
* @example "1 Nimmer on Copyright § 5.05[A]"
|
|
950
|
+
* → { volume: 1, title: "Nimmer on Copyright", section: "5.05[A]" }
|
|
951
|
+
*/
|
|
952
|
+
interface TreatiseCitation extends CitationBase {
|
|
953
|
+
type: "treatise";
|
|
954
|
+
/** Volume number (string for hyphenated volumes) */
|
|
955
|
+
volume: number | string;
|
|
956
|
+
/** Title/author body as it appears in the citation */
|
|
957
|
+
title: string;
|
|
958
|
+
/** Section number / locator (string to preserve dots and bracketed suffixes) */
|
|
959
|
+
section: string;
|
|
960
|
+
/** Edition + year, when present in trailing parenthetical (e.g., "5th ed. 2008") */
|
|
961
|
+
edition?: string;
|
|
962
|
+
/** Publication year (if extracted from parenthetical) */
|
|
963
|
+
year?: number;
|
|
964
|
+
/** Precise text positions for each parsed component of this citation. */
|
|
965
|
+
spans?: TreatiseComponentSpans;
|
|
966
|
+
}
|
|
967
|
+
/**
|
|
968
|
+
* Annotation citation (#581).
|
|
969
|
+
*
|
|
970
|
+
* The American Law Reports (A.L.R.) series publishes annotations on
|
|
971
|
+
* narrow legal issues — these look like case citations
|
|
972
|
+
* (`100 A.L.R.2d 1234`) but are secondary authority, not case law.
|
|
973
|
+
*
|
|
974
|
+
* @example "100 A.L.R.2d 1234" → { series: "A.L.R.2d", volume: 100, page: 1234 }
|
|
975
|
+
* @example "23 A.L.R. Fed. 3d 456" → { series: "A.L.R. Fed. 3d", volume: 23, page: 456 }
|
|
976
|
+
*/
|
|
977
|
+
interface AnnotationCitation extends CitationBase {
|
|
978
|
+
type: "annotation";
|
|
979
|
+
/** A.L.R. series identifier (`A.L.R.`, `A.L.R.2d`, `A.L.R. Fed.`, etc.) */
|
|
980
|
+
series: string;
|
|
981
|
+
/** Volume number */
|
|
982
|
+
volume: number;
|
|
983
|
+
/** Page number where the annotation begins */
|
|
984
|
+
page: number;
|
|
985
|
+
/** Publication year (if extracted from parenthetical) */
|
|
986
|
+
year?: number;
|
|
987
|
+
/** Precise text positions for each parsed component of this citation. */
|
|
988
|
+
spans?: AnnotationComponentSpans;
|
|
989
|
+
}
|
|
990
|
+
/**
|
|
837
991
|
* Docket-number-only case citation (no traditional reporter assignment).
|
|
838
992
|
*
|
|
839
993
|
* Used for very recent decisions identified by docket/slip number, common for:
|
|
@@ -1079,16 +1233,16 @@ interface ShortFormCaseCitation extends CitationBase {
|
|
|
1079
1233
|
* // ...
|
|
1080
1234
|
* }
|
|
1081
1235
|
*/
|
|
1082
|
-
type Citation = FullCaseCitation | DocketCitation | StatuteCitation | JournalCitation | NeutralCitation | PublicLawCitation | FederalRegisterCitation | StatutesAtLargeCitation | ConstitutionalCitation | IdCitation | SupraCitation | ShortFormCaseCitation;
|
|
1236
|
+
type Citation = FullCaseCitation | DocketCitation | StatuteCitation | JournalCitation | NeutralCitation | PublicLawCitation | FederalRegisterCitation | StatutesAtLargeCitation | ConstitutionalCitation | FederalRuleCitation | RestatementCitation | TreatiseCitation | AnnotationCitation | IdCitation | SupraCitation | ShortFormCaseCitation;
|
|
1083
1237
|
/**
|
|
1084
1238
|
* Citation type discriminators grouped by category.
|
|
1085
1239
|
*/
|
|
1086
|
-
type FullCitationType = "case" | "docket" | "statute" | "journal" | "neutral" | "publicLaw" | "federalRegister" | "statutesAtLarge" | "constitutional";
|
|
1240
|
+
type FullCitationType = "case" | "docket" | "statute" | "journal" | "neutral" | "publicLaw" | "federalRegister" | "statutesAtLarge" | "constitutional" | "federalRule" | "restatement" | "treatise" | "annotation";
|
|
1087
1241
|
type ShortFormCitationType = "id" | "supra" | "shortFormCase";
|
|
1088
1242
|
/**
|
|
1089
1243
|
* Union of all full citation types (not short-form references).
|
|
1090
1244
|
*/
|
|
1091
|
-
type FullCitation = FullCaseCitation | DocketCitation | StatuteCitation | JournalCitation | NeutralCitation | PublicLawCitation | FederalRegisterCitation | StatutesAtLargeCitation | ConstitutionalCitation;
|
|
1245
|
+
type FullCitation = FullCaseCitation | DocketCitation | StatuteCitation | JournalCitation | NeutralCitation | PublicLawCitation | FederalRegisterCitation | StatutesAtLargeCitation | ConstitutionalCitation | FederalRuleCitation | RestatementCitation | TreatiseCitation | AnnotationCitation;
|
|
1092
1246
|
/**
|
|
1093
1247
|
* Union of all short-form citation types (Id., supra, short-form case).
|
|
1094
1248
|
*/
|
|
@@ -1111,5 +1265,5 @@ type CitationOfType<T extends CitationType> = Extract<Citation, {
|
|
|
1111
1265
|
*/
|
|
1112
1266
|
type ExtractorMap = { [K in FullCitationType]: CitationOfType<K> };
|
|
1113
1267
|
//#endregion
|
|
1114
|
-
export {
|
|
1115
|
-
//# sourceMappingURL=citation-
|
|
1268
|
+
export { SupraCitation as A, PublicLawComponentSpans as B, RestatementCitation as C, StatuteCitation as D, ShortFormCitationType as E, ConstitutionalComponentSpans as F, Span as G, StatuteComponentSpans as H, FederalRegisterComponentSpans as I, PinciteInfo as J, TransformationMap as K, FederalRuleComponentSpans as L, Warning as M, AnnotationComponentSpans as N, StatutesAtLargeCitation as O, CaseComponentSpans as P, JournalComponentSpans as R, PublicLawCitation as S, ShortFormCitation as T, StatutesAtLargeComponentSpans as U, RestatementComponentSpans as V, TreatiseComponentSpans as W, parsePincite as Y, IdCitation as _, CitationSignal as a, Parenthetical as b, CourtInference as c, FederalRegisterCitation as d, FederalRuleCitation as f, HistorySignal as g, FullCitationType as h, CitationOfType as i, TreatiseCitation as j, SubsequentHistoryEntry as k, DocketCitation as l, FullCitation as m, Citation as n, CitationType as o, FullCaseCitation as p, spanFromGroupIndex as q, CitationBase as r, ConstitutionalCitation as s, AnnotationCitation as t, ExtractorMap as u, JournalCitation as v, ShortFormCaseCitation as w, ParentheticalType as x, NeutralCitation as y, NeutralComponentSpans as z };
|
|
1269
|
+
//# sourceMappingURL=citation-QUXhCp8T.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"citation-QUXhCp8T.d.mts","names":[],"sources":["../src/extract/pincite.ts","../src/extract/dates.ts","../src/clean/segmentMap.ts","../src/types/span.ts","../src/types/componentSpans.ts","../src/types/citation.ts"],"mappings":";;AAUA;;;;;;;;;UAAiB,WAAA;;EAEf,IAAA;;EAEA,OAAA;;;EAGA,QAAA;EA+DF;EA7DE,WAAA;;EAEA,OAAA;EA2DyC;;;EAvDzC,QAAA;ECNF;EDQE,SAAA;;EAEA,YAAA;;;;;;ACDF;;EDSE,kBAAA,GAAqB,WAAA;ECLb;EDOR,GAAA;AAAA;;;;;;;AE/BF;;;;;;;iBFwEgB,YAAA,CAAa,GAAA,WAAc,WAAA;;;;AAtE3C;;;;;;;;;;;;;;;;;UCSiB,UAAA;EACf,IAAA;EACA,KAAA;EACA,GAAA;AAAA;;;;UAMe,cAAA;EATA;EAWf,GAAA;EAXe;EAaf,MAAA,EAAQ,UAAA;AAAA;;;;ADtBV;;;;;;UEFiB,OAAA;;EAEf,QAAA;;EAEA,OAAA;;EAEA,GAAA;AAAA;AAAA,cAGW,UAAA;EAAA,SACF,QAAA,WAAmB,OAAA;EAE5B,WAAA,CAAY,QAAA,EAAU,OAAA;EF4DxB;;;EAAA,OErDS,QAAA,CAAS,MAAA,WAAiB,UAAA;EFqDQ;;;;AC7D3C;ED6D2C,OE5ClC,OAAA,CAAQ,GAAA,EAAK,GAAA,mBAAsB,UAAA;;;;;EAkC1C,MAAA,CAAO,QAAA;AAAA;;;;AF5DT;;;;;;;;;;;;;;;;UGOiB,IAAA;EH+DjB;EG7DE,UAAA;;EAGA,QAAA;EH0DyC;EGvDzC,aAAA;;EAGA,WAAA;AAAA;;;;;;;UASe,iBAAA;EFff;EEiBA,eAAA,EAAiB,GAAA;EFXF;EEcf,eAAA,EAAiB,GAAA;EFVT;EEaR,uBAAA,GAHiB,U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,qBAAA;;;;KAKA,YAAA,GACR,gBAAA,GACA,cAAA,GACA,eAAA,GACA,eAAA,GACA,eAAA,GACA,iBAAA,GACA,uBAAA,GACA,uBAAA,GACA,sBAAA,GACA,mBAAA,GACA,mBAAA,GACA,gBAAA,GACA,kBAAA;;;;KAKQ,iBAAA,GAAoB,UAAA,GAAa,aAAA,GAAgB,qBAAA;;;;;;;;;;KAWjD,cAAA,WAAyB,YAAA,IAAgB,OAAA,CAAQ,QAAA;EAAY,IAAA,EAAM,CAAA;AAAA;;;;AAlC/E;KAwCY,YAAA,WACJ,gBAAA,GAAmB,cAAA,CAAe,CAAA"}
|
package/dist/data/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../knownCodes-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../knownCodes-D8wb047j.cjs`);async function t(){let t=e.s();if(t)return t;let n=await import(`../../data/reporters.json`,{assert:{type:`json`}}),r=new Map,i=[],a=n.default||n;for(let[e,t]of Object.entries(a))for(let e of t){i.push(e);for(let t of Object.keys(e.editions)){let n=t.toLowerCase();r.has(n)||r.set(n,[]),r.get(n)?.push(e)}for(let[t,n]of Object.entries(e.variations||{})){let n=t.toLowerCase();r.has(n)||r.set(n,[]),r.get(n)?.push(e)}}let o={byAbbreviation:r,all:i};return e.c(o),o}function n(){return e.s()}async function r(e){return(await t()).byAbbreviation.get(e.toLowerCase())??[]}exports.abbreviatedCodes=e.t,exports.findAbbreviatedCode=e.n,exports.findNamedCode=e.r,exports.findReportersByAbbreviation=r,exports.getReportersSync=n,exports.loadReporters=t,exports.namedCodes=e.i,exports.stateStatuteEntries=e.o;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/data/knownCodes.ts","../../src/data/reporters.ts","../../src/data/stateStatutes.ts"],"mappings":";;AAgBA;;;;;UAAiB,SAAA;;EAEf,YAAA;;EAEA,YAAA;EAgBF;EAdE,QAAA;;EAEA,MAAA;AAAA;AAkCF;;;;;AAyuBA;;;;AAzuBA,cAtBa,gBAAA,EAAkB,SAAA;;;;;AA80B/B;;;;;;;;AC51BA;;;cDoCa,UAAA,EAAY,SAAA;;ACpBzB;;;;;;;;;;;;;;;;;;iBD6vBgB,aAAA,CAAc,YAAA,UAAsB,QAAA,WAAmB,SAAA;;ACtuBvE;;;;;;;;;;;;;;;iBDqzBgB,mBAAA,CAAoB,UAAA,WAAqB,SAAA;;;;AAl2BzD;;;;;;;;;;AAoBA;;;;;AAsBA;;;;;AAAA,UCpCiB,eAAA;ED6wBD;EC3wBd,KAAA;ED2wBqE;ECzwBrE,GAAA;AAAA;;;;ADw1BF;;;;;;UC50BiB,aAAA;;EAEf,IAAA;EAlBe;EAoBf,SAAA;EApBe;EAsBf,QAAA,EAAU,MAAA,SAAe,eAAA;EAN3B;EAQE,UAAA,GAAa,MAAA;;EAEb,gBAAA;;EAEA,SAAA;;EAEA,KAAA;AAAA;;;;;;;UASe,iBAAA;;EAEf,cAAA,EAAgB,GAAA,SAAY,aAAA;;EAE5B,GAAA,EAAK,aAAA;AAAA;;;;;;;;;;;;;iBAoBe,aAAA,CAAA,GAAiB,OAAA,CAAQ,iBAAA;;AAA/C;;;;;AA6DA;;;;;AAqBA;;;;;iBArBgB,gBAAA,CAAA,GAAoB,iBAAA;;;;;;;AC7IpC;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/data/knownCodes.ts","../../src/data/reporters.ts","../../src/data/stateStatutes.ts"],"mappings":";;AAgBA;;;;;UAAiB,SAAA;;EAEf,YAAA;;EAEA,YAAA;EAgBF;EAdE,QAAA;;EAEA,MAAA;AAAA;AAkCF;;;;;AAyuBA;;;;AAzuBA,cAtBa,gBAAA,EAAkB,SAAA;;;;;AA80B/B;;;;;;;;AC51BA;;;cD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;;;AAl2BzD;;;;;;;;;;AAoBA;;;;;AAsBA;;;;;AAAA,UCpCiB,eAAA;ED6wBD;EC3wBd,KAAA;ED2wBqE;ECzwBrE,GAAA;AAAA;;;;ADw1BF;;;;;;UC50BiB,aAAA;;EAEf,IAAA;EAlBe;EAoBf,SAAA;EApBe;EAsBf,QAAA,EAAU,MAAA,SAAe,eAAA;EAN3B;EAQE,UAAA,GAAa,MAAA;;EAEb,gBAAA;;EAEA,SAAA;;EAEA,KAAA;AAAA;;;;;;;UASe,iBAAA;;EAEf,cAAA,EAAgB,GAAA,SAAY,aAAA;;EAE5B,GAAA,EAAK,aAAA;AAAA;;;;;;;;;;;;;iBAoBe,aAAA,CAAA,GAAiB,OAAA,CAAQ,iBAAA;;AAA/C;;;;;AA6DA;;;;;AAqBA;;;;;iBArBgB,gBAAA,CAAA,GAAoB,iBAAA;;;;;;;AC7IpC;;;;;;;;;AAyGA;;iBDyDsB,2BAAA,CAA4B,IAAA,WAAe,OAAA,CAAQ,aAAA;;;;ADvJzE;;;UEXiB,iBAAA;;EAEf,YAAA;;EAEA,aAAA;;;AF2BF;;;EErBE,aAAA;AAAA;ADOF;;;;AAAA,cCwFa,mBAAA,EAAqB,iBAAA"}
|
package/dist/data/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as e,i as t,n,o as r,r as i,s as a,t as o}from"../knownCodes-
|
|
1
|
+
import{c as e,i as t,n,o as r,r as i,s as a,t as o}from"../knownCodes-CWwNTnJy.mjs";async function s(){let t=a();if(t)return t;let n=await import(`../../data/reporters.json`,{assert:{type:`json`}}),r=new Map,i=[],o=n.default||n;for(let[e,t]of Object.entries(o))for(let e of t){i.push(e);for(let t of Object.keys(e.editions)){let n=t.toLowerCase();r.has(n)||r.set(n,[]),r.get(n)?.push(e)}for(let[t,n]of Object.entries(e.variations||{})){let n=t.toLowerCase();r.has(n)||r.set(n,[]),r.get(n)?.push(e)}}let s={byAbbreviation:r,all:i};return e(s),s}function c(){return a()}async function l(e){return(await s()).byAbbreviation.get(e.toLowerCase())??[]}export{o as abbreviatedCodes,n as findAbbreviatedCode,i as findNamedCode,l as findReportersByAbbreviation,c as getReportersSync,s as loadReporters,t as namedCodes,r as stateStatuteEntries};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|