crimlab 0.0.0-stage → 0.0.1

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/LICENSE ADDED
@@ -0,0 +1,71 @@
1
+ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/
2
+
3
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
4
+
5
+ 1. Definitions.
6
+
7
+ "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
8
+
9
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
10
+
11
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
12
+
13
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
14
+
15
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
16
+
17
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
18
+
19
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
20
+
21
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
22
+
23
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
24
+
25
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
26
+
27
+ 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
28
+
29
+ 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
30
+
31
+ 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
32
+
33
+ (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
34
+
35
+ (b) You must cause any modified files to carry prominent notices stating that You changed the files; and
36
+
37
+ (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
38
+
39
+ (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
40
+
41
+ You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
42
+
43
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
44
+
45
+ 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
46
+
47
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
48
+
49
+ 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
50
+
51
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
52
+
53
+ END OF TERMS AND CONDITIONS
54
+
55
+ APPENDIX: How to apply the Apache License to your work.
56
+
57
+ To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
58
+
59
+ Copyright 2026 Vansh Singh Ruhela (rootcoder007)
60
+
61
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
62
+
63
+ http://www.apache.org/licenses/LICENSE-2.0
64
+
65
+ Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
66
+
67
+ ---- LLVM Exceptions to the Apache 2.0 License ----
68
+
69
+ As an exception, if, as a result of your compiling your source code, portions of this Software are embedded into an Object form of such source code, you may redistribute such embedded portions in such Object form without complying with the conditions of Sections 4(a), 4(b) and 4(d) of the License.
70
+
71
+ In addition, if you combine or link compiled forms of this Software with software that is licensed under the GPLv2 ("Combined Software") and if a court of competent jurisdiction determines that the patent provision (Section 3), the indemnity provision (Section 9) or other Section of the License conflicts with the conditions of the GPLv2, you may retroactively and prospectively choose to deem waived or otherwise exclude such Section(s) of the License, but only in their entirety and only with respect to the Combined Software.
package/NOTICE ADDED
@@ -0,0 +1,6 @@
1
+ crimlab
2
+ Copyright 2026 Vansh Singh Ruhela (rootcoder007)
3
+
4
+ This product is licensed under the Apache License, Version 2.0, with
5
+ LLVM Exceptions (SPDX: Apache-2.0 WITH LLVM-exception); see LICENSE.
6
+ The R package carries the exceptions in its file LICENSE.note.
package/README.md CHANGED
@@ -1,3 +1,30 @@
1
- # Temporary Holding Version
1
+ # crimlab for JavaScript
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Criminology and sociolegal statistics: the C++ kernels of the R and Python
4
+ packages [crimlab](https://github.com/rootcoder007/crimlab), built to
5
+ WebAssembly, with the `crimlab` command. No dependencies; the module sees
6
+ no files and no network.
7
+
8
+ ```sh
9
+ npx crimlab orrisk --or 2 --rate 0.1 --share 0.3
10
+ echo '{"done": [30, 45, 60], "open": [100, 150]}' | npx crimlab losbnd -j
11
+ npx crimlab -l # every function and its arguments
12
+ ```
13
+
14
+ ```js
15
+ import crimlab, { jrun, jfns } from 'crimlab';
16
+
17
+ crimlab.orrisk({ or: 2, rate: 0.1, share: 0.3 });
18
+ // { exposed: 0.1475..., unexposed: 0.0796..., rr: 1.8524..., or: 2 }
19
+ jrun('vodtst', { day: { a: 40, b: 60 }, night: { a: 50, b: 50 }, ref: 'b' });
20
+ ```
21
+
22
+ Every function of the Python package is here under its R name, with the
23
+ same named arguments, checks and results. A data frame is an object of
24
+ columns, a named vector an object of numbers, a missing value `null`, and
25
+ a number JSON cannot hold the string `"NaN"`, `"Inf"` or `"-Inf"`. An
26
+ object given for a per-group argument names the groups. A refused call
27
+ throws an `Error` whose message names the function and what is wrong.
28
+
29
+ Node 18 or later, or any browser with WebAssembly (the module is fetched
30
+ next to `lib/`). Licence: Apache-2.0 WITH LLVM-exception.
package/bin/crimlab.js ADDED
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/env node
2
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3
+ // npx crimlab: the command-line program (cli/main.cpp) built to
4
+ // WebAssembly. The module sees no files: -f FILE is read here and given
5
+ // to it as standard input.
6
+ import { readFileSync } from 'node:fs';
7
+ import { load } from '../lib/wasm.js';
8
+
9
+ const argv = process.argv.slice(2);
10
+ let input = null;
11
+ const i = argv.indexOf('-f');
12
+ if (i > 0 && i + 1 < argv.length && argv[i + 1] !== '-') {
13
+ try {
14
+ input = readFileSync(argv[i + 1]);
15
+ } catch {
16
+ process.stderr.write(`crimlab: cannot open ${argv[i + 1]}.\n`);
17
+ process.exit(2);
18
+ }
19
+ argv[i + 1] = '-';
20
+ }
21
+ const m = await load(() => input ?? readFileSync(0));
22
+ const r = m.cmain(argv);
23
+ process.stdout.write(r.out);
24
+ process.stderr.write(r.err);
25
+ process.exitCode = r.code;
Binary file
package/lib/index.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2
+ /** A result as JSON.parse gives it. */
3
+ export type Json = null | boolean | number | string | Json[] | { [k: string]: Json };
4
+ /** Runs the function `name` (its R name) on its named arguments; throws an Error with the reason when it refuses them. */
5
+ export function jrun(name: string, args?: Record<string, unknown> | string): Json;
6
+ /** The functions and their argument names ("?" marks an optional one). */
7
+ export function jfns(): Record<string, string[]>;
8
+ /** Every function as a method, by its R name. */
9
+ declare const crimlab: Readonly<Record<string, (args?: Record<string, unknown> | string) => Json>>;
10
+ export default crimlab;
package/lib/index.js ADDED
@@ -0,0 +1,29 @@
1
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2
+ //
3
+ // crimlab: criminology and sociolegal statistics. Every function of the R
4
+ // and Python packages crimlab, by its R name, from the C++ kernels built
5
+ // to WebAssembly. A function takes its named arguments as an object and
6
+ // returns its result as JSON.parse gives it: a data frame is an object of
7
+ // columns, a named vector an object of numbers, a missing value null, and
8
+ // a number JSON cannot hold the string "NaN", "Inf" or "-Inf".
9
+ import { load } from './wasm.js';
10
+
11
+ const m = await load();
12
+
13
+ /** Runs the function `name` on `args` (an object, or JSON text). */
14
+ export function jrun(name, args = {}) {
15
+ const [rc, s] = m.jrun(String(name), typeof args === 'string' ? args : JSON.stringify(args));
16
+ if (rc !== 0) throw new Error(s);
17
+ return JSON.parse(s);
18
+ }
19
+
20
+ /** The functions and their argument names ("?" marks an optional one). */
21
+ export function jfns() {
22
+ return JSON.parse(m.jfns());
23
+ }
24
+
25
+ /** Every function as a method: crimlab.orrisk({ or: 2, rate: 0.1, share: 0.3 }). */
26
+ const crimlab = Object.freeze(
27
+ Object.fromEntries(Object.keys(jfns()).map((n) => [n, (args) => jrun(n, args)])),
28
+ );
29
+ export default crimlab;
package/lib/wasm.js ADDED
@@ -0,0 +1,203 @@
1
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2
+ //
3
+ // The host side of crimlab.wasm (build.sh): the WASI preview 1 functions
4
+ // it imports. It sees no files, no environment and no network: standard
5
+ // input is the bytes the caller gives (or, for the command, this
6
+ // process's standard input, read when the module first asks), and what it
7
+ // writes to standard output and error is collected. Every other call
8
+ // answers EBADF or ENOSYS.
9
+
10
+ const BADF = 8;
11
+ const NOENT = 44;
12
+ const NOSYS = 52;
13
+ const SPIPE = 70;
14
+ const enc = new TextEncoder();
15
+ const dec = new TextDecoder();
16
+
17
+ class Exit {
18
+ constructor(code) {
19
+ this.code = code;
20
+ }
21
+ }
22
+
23
+ async function bytes() {
24
+ const u = new URL('../dist/crimlab.wasm', import.meta.url);
25
+ if (u.protocol === 'file:') {
26
+ const { readFile } = await import('node:fs/promises');
27
+ return readFile(u);
28
+ }
29
+ const r = await fetch(u);
30
+ if (!r.ok) throw new Error(`crimlab: cannot fetch ${u}`);
31
+ return new Uint8Array(await r.arrayBuffer());
32
+ }
33
+
34
+ /** Instantiates the module. stdin() returns the bytes of standard input. */
35
+ export async function load(stdin = () => new Uint8Array(0)) {
36
+ let mem = null;
37
+ let inp = null;
38
+ let inpos = 0;
39
+ const out = [[], []];
40
+ const dv = () => new DataView(mem.buffer);
41
+ const u8 = () => new Uint8Array(mem.buffer);
42
+ const iov = (p, n, f) => {
43
+ let t = 0;
44
+ for (let i = 0; i < n; i++) {
45
+ const b = dv().getUint32(p + 8 * i, true);
46
+ const l = dv().getUint32(p + 8 * i + 4, true);
47
+ const k = f(b, l);
48
+ t += k;
49
+ if (k < l) break;
50
+ }
51
+ return t;
52
+ };
53
+ const wasi = {
54
+ // an empty environment: no variables, no bytes (the C++ library asks when it sets up its locale)
55
+ environ_sizes_get(np, sp) {
56
+ dv().setUint32(np, 0, true);
57
+ dv().setUint32(sp, 0, true);
58
+ return 0;
59
+ },
60
+ environ_get: () => 0,
61
+ clock_time_get(id, prec, p) {
62
+ dv().setBigUint64(p, BigInt(Math.round(performance.now() * 1e6)), true);
63
+ return 0;
64
+ },
65
+ fd_close: () => 0,
66
+ fd_fdstat_get(fd, p) {
67
+ if (fd > 2) return BADF;
68
+ u8().fill(0, p, p + 24);
69
+ dv().setUint8(p, 2); // a character device
70
+ return 0;
71
+ },
72
+ fd_fdstat_set_flags: () => NOSYS,
73
+ fd_prestat_get: () => BADF,
74
+ fd_prestat_dir_name: () => BADF,
75
+ path_open: () => NOENT,
76
+ fd_seek: () => SPIPE,
77
+ fd_read(fd, p, n, np) {
78
+ if (fd !== 0) return BADF;
79
+ if (inp === null) inp = stdin();
80
+ dv().setUint32(np, iov(p, n, (b, l) => {
81
+ const k = Math.min(l, inp.length - inpos);
82
+ u8().set(inp.subarray(inpos, inpos + k), b);
83
+ inpos += k;
84
+ return k;
85
+ }), true);
86
+ return 0;
87
+ },
88
+ fd_write(fd, p, n, np) {
89
+ if (fd !== 1 && fd !== 2) return BADF;
90
+ dv().setUint32(np, iov(p, n, (b, l) => {
91
+ out[fd - 1].push(u8().slice(b, b + l));
92
+ return l;
93
+ }), true);
94
+ return 0;
95
+ },
96
+ proc_exit(code) {
97
+ throw new Exit(code);
98
+ },
99
+ };
100
+ // There is no file system here. A function that would read a folder or a
101
+ // file (the power counters of raplok(), the time-zone files of dtctloc())
102
+ // imports calls this object does not list; each answers "not supported",
103
+ // so the function refuses or falls back as it does where the file is
104
+ // absent, and a new import cannot stop the module from loading.
105
+ const host = new Proxy(wasi, { get: (t, k) => (k in t ? t[k] : () => NOSYS) });
106
+ const { instance } = await WebAssembly.instantiate(await bytes(), { wasi_snapshot_preview1: host });
107
+ const x = instance.exports;
108
+ mem = x.memory;
109
+ x._initialize();
110
+
111
+ const cstr = (s) => {
112
+ const b = enc.encode(s);
113
+ const p = x.malloc(b.length + 1);
114
+ u8().set(b, p);
115
+ u8()[p + b.length] = 0;
116
+ return p;
117
+ };
118
+ const read = (p) => {
119
+ const m = u8();
120
+ let e = p;
121
+ while (m[e] !== 0) e++;
122
+ return dec.decode(m.subarray(p, e));
123
+ };
124
+ const drain = (i) => {
125
+ const s = dec.decode(Buffer.concat(out[i]));
126
+ out[i] = [];
127
+ return s;
128
+ };
129
+
130
+ // A failed allocation cannot be unwound in a build without exceptions:
131
+ // the module's new-handler records it (clab_oomed()) and stops it. Such a
132
+ // stop is reported in words, as the other bindings report CLAB_ENOMEM,
133
+ // and the module, whose heap is then unusable, refuses further calls.
134
+ let dead = false;
135
+ const oom = (e) => e instanceof WebAssembly.RuntimeError && x.clab_oomed && x.clab_oomed() !== 0;
136
+ const alive = () => {
137
+ if (dead) throw new Error('crimlab: the module ran out of memory; load it again');
138
+ };
139
+
140
+ return {
141
+ /** clab_jrun(): [status, JSON result or message]. */
142
+ jrun(name, args) {
143
+ alive();
144
+ let f, a, need;
145
+ try {
146
+ f = cstr(name);
147
+ a = cstr(args);
148
+ need = x.malloc(4);
149
+ } catch (e) {
150
+ if (!oom(e)) throw e;
151
+ dead = true;
152
+ return [4, `${name}: not enough memory for this size.`];
153
+ }
154
+ let cap = 1 << 16;
155
+ try {
156
+ for (;;) {
157
+ const o = x.malloc(cap);
158
+ const rc = x.clab_jrun(f, a, o, cap, need);
159
+ const n = dv().getInt32(need, true);
160
+ const s = rc === 3 && n > cap ? null : read(o);
161
+ x.free(o);
162
+ if (s === null) {
163
+ cap = n;
164
+ continue;
165
+ }
166
+ return [rc, s];
167
+ }
168
+ } catch (e) {
169
+ if (!oom(e)) throw e;
170
+ dead = true;
171
+ return [4, `${name}: not enough memory for this size.`];
172
+ } finally {
173
+ if (!dead) {
174
+ x.free(f);
175
+ x.free(a);
176
+ x.free(need);
177
+ }
178
+ }
179
+ },
180
+ jfns: () => read(x.clab_jfns()),
181
+ /** The command: its exit status, standard output and standard error. */
182
+ cmain(argv) {
183
+ alive();
184
+ const ps = ['crimlab', ...argv].map(cstr);
185
+ const v = x.malloc(4 * (ps.length + 1));
186
+ ps.forEach((p, i) => dv().setUint32(v + 4 * i, p, true));
187
+ dv().setUint32(v + 4 * ps.length, 0, true);
188
+ let code;
189
+ try {
190
+ code = x.clab_cmain(ps.length, v);
191
+ } catch (e) {
192
+ if (oom(e)) {
193
+ dead = true;
194
+ return { code: 1, out: drain(0), err: drain(1) + 'crimlab: not enough memory for this size.\n' };
195
+ }
196
+ if (!(e instanceof Exit)) throw e;
197
+ code = e.code;
198
+ }
199
+ x.fflush(0);
200
+ return { code, out: drain(0), err: drain(1) };
201
+ },
202
+ };
203
+ }
package/package.json CHANGED
@@ -1,6 +1,32 @@
1
1
  {
2
2
  "name": "crimlab",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.0.1",
4
+ "description": "Criminology and sociolegal statistics: every function of the R and Python packages crimlab, from the C++ kernels as WebAssembly, and the crimlab command",
5
+ "keywords": ["statistics", "criminology", "forensics", "policing", "courts", "webassembly"],
6
+ "license": "Apache-2.0 WITH LLVM-exception",
7
+ "author": "Vansh Singh Ruhela (https://orcid.org/0009-0004-1750-3592)",
8
+ "homepage": "https://github.com/rootcoder007/crimlab/tree/main/bindings/npm#readme",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/rootcoder007/crimlab.git",
12
+ "directory": "bindings/npm"
13
+ },
14
+ "bugs": { "url": "https://github.com/rootcoder007/crimlab/issues" },
15
+ "type": "module",
16
+ "exports": {
17
+ ".": { "types": "./lib/index.d.ts", "default": "./lib/index.js" },
18
+ "./crimlab.wasm": "./dist/crimlab.wasm",
19
+ "./package.json": "./package.json"
20
+ },
21
+ "types": "./lib/index.d.ts",
22
+ "bin": { "crimlab": "bin/crimlab.js" },
23
+ "files": ["lib/", "bin/", "dist/crimlab.wasm", "LICENSE", "NOTICE", "README.md"],
24
+ "sideEffects": false,
25
+ "engines": { "node": ">=18" },
26
+ "scripts": {
27
+ "build": "sh build.sh",
28
+ "test": "node --test test/api.test.js",
29
+ "prepack": "test -f dist/crimlab.wasm"
30
+ },
31
+ "publishConfig": { "access": "public", "provenance": true, "registry": "https://registry.npmjs.org/" }
32
+ }