@calcit/procs 0.5.34 → 0.5.37

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.
@@ -168,7 +168,7 @@ let defaultHash_record = valueHash("record:");
168
168
  let defaultHash_unknown = valueHash("unknown:");
169
169
  let fnHashCounter = 0;
170
170
  let jsObjectHashCounter = 0;
171
- let hashFunction = (x) => {
171
+ export let hashFunction = (x) => {
172
172
  if (x == null) {
173
173
  return defaultHash_nil;
174
174
  }
@@ -1,11 +1,10 @@
1
1
  var _a;
2
2
  // CALCIT VERSION
3
- export const calcit_version = "0.5.34";
4
- import "@calcit/ternary-tree";
3
+ export const calcit_version = "0.5.37";
5
4
  import { parse } from "@cirru/parser.ts";
6
5
  import { writeCirruCode } from "@cirru/writer.ts";
7
6
  import "./js-primes.mjs";
8
- import { CalcitSymbol, CalcitKeyword, CalcitRef, CalcitRecur, kwd, refsRegistry, toString, getStringName, _$n__$e_, } from "./calcit-data.mjs";
7
+ import { CalcitSymbol, CalcitKeyword, CalcitRef, CalcitRecur, kwd, refsRegistry, toString, getStringName, _$n__$e_, hashFunction, } from "./calcit-data.mjs";
9
8
  import { CalcitRecord } from "./js-record.mjs";
10
9
  export * from "./calcit-data.mjs";
11
10
  export * from "./js-record.mjs";
@@ -1289,6 +1288,9 @@ export let _$n_buffer = (...xs) => {
1289
1288
  }
1290
1289
  return buf;
1291
1290
  };
1291
+ export let _$n_hash = (x) => {
1292
+ return hashFunction(x);
1293
+ };
1292
1294
  // special procs have to be defined manually
1293
1295
  export let reduce = foldl;
1294
1296
  let unavailableProc = (...xs) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@calcit/procs",
3
- "version": "0.5.34",
3
+ "version": "0.5.37",
4
4
  "main": "./lib/calcit.procs.mjs",
5
5
  "devDependencies": {
6
6
  "@types/node": "^17.0.23",
@@ -198,7 +198,7 @@ let defaultHash_unknown = valueHash("unknown:");
198
198
  let fnHashCounter = 0;
199
199
  let jsObjectHashCounter = 0;
200
200
 
201
- let hashFunction = (x: CalcitValue): Hash => {
201
+ export let hashFunction = (x: CalcitValue): Hash => {
202
202
  if (x == null) {
203
203
  return defaultHash_nil;
204
204
  }
@@ -1,7 +1,6 @@
1
1
  // CALCIT VERSION
2
- export const calcit_version = "0.5.34";
2
+ export const calcit_version = "0.5.37";
3
3
 
4
- import { overwriteComparator, initTernaryTreeMap } from "@calcit/ternary-tree";
5
4
  import { parse, ICirruNode } from "@cirru/parser.ts";
6
5
  import { writeCirruCode } from "@cirru/writer.ts";
7
6
 
@@ -18,6 +17,7 @@ import {
18
17
  getStringName,
19
18
  to_js_data,
20
19
  _$n__$e_,
20
+ hashFunction,
21
21
  } from "./calcit-data.mjs";
22
22
 
23
23
  import { fieldsEqual, CalcitRecord } from "./js-record.mjs";
@@ -1382,6 +1382,10 @@ export let _$n_buffer = (...xs: CalcitValue[]): Uint8Array => {
1382
1382
  return buf;
1383
1383
  };
1384
1384
 
1385
+ export let _$n_hash = (x: CalcitValue): number => {
1386
+ return hashFunction(x);
1387
+ };
1388
+
1385
1389
  // special procs have to be defined manually
1386
1390
  export let reduce = foldl;
1387
1391