|
333 | 333 |
|
334 | 334 | /** |
335 | 335 | * The getTablesHash function returns a hash for the tabular part of a Store, |
336 | | - * based on each Table and a top-level tabular HLC. |
| 336 | + * based on each Table Id and hash. |
337 | 337 | * @param tableHashes An object containing each Table Id and its hash. |
338 | | - * @param tablesHlc The top-level HLC of the tabular part of the Store. |
339 | 338 | * @returns A hash of the Tables. |
340 | 339 | * @example |
341 | 340 | * This example gets the hash of the tabular part of a Store. |
342 | 341 | * ```js |
343 | 342 | * import {getTablesHash} from 'tinybase'; |
344 | 343 | * |
345 | 344 | * const tableHashes = { |
346 | | - * pets: 2544679909, // hash of its contents |
| 345 | + * pets: 4262151841, // hash of its contents |
347 | 346 | * }; |
348 | | - * const tablesHlc = '03E3B------mmxrx'; |
349 | 347 | * |
350 | | - * console.log(getTablesHash(tableHashes, tablesHlc)); |
351 | | - * // -> 1835775460 |
| 348 | + * console.log(getTablesHash(tableHashes)); |
| 349 | + * // -> 278115833 |
352 | 350 | * ``` |
353 | 351 | * @category Hash |
354 | 352 | * @since v6.2.0 |
|
367 | 365 | * import {getTableInTablesHash} from 'tinybase'; |
368 | 366 | * |
369 | 367 | * const tableId = 'pets'; |
370 | | - * const tableHash = 2544679909; // hash of its contents |
| 368 | + * const tableHash = 4262151841; // hash of its contents |
371 | 369 | * |
372 | 370 | * console.log(getTableInTablesHash(tableId, tableHash)); |
373 | | - * // -> 2778789628 |
| 371 | + * // -> 278115833 |
374 | 372 | * ``` |
375 | 373 | * @category Hash |
376 | 374 | * @since v6.2.0 |
|
379 | 377 |
|
380 | 378 | /** |
381 | 379 | * The getTableHash function returns a hash for a single Table in a Store, based |
382 | | - * on each Row and the HLC of the Table. |
| 380 | + * on each Row Id and hash. |
383 | 381 | * @param rowHashes An object containing each Row Id and its hash. |
384 | | - * @param tableHlc The HLC of the Table. |
385 | 382 | * @returns A hash of the Table. |
386 | 383 | * @example |
387 | 384 | * This example gets the hash of a Table. |
388 | 385 | * ```js |
389 | 386 | * import {getTableHash} from 'tinybase'; |
390 | 387 | * |
391 | 388 | * const rowHashes = { |
392 | | - * fido: 703486916, // hash of its contents |
| 389 | + * fido: 1810444343, // hash of its contents |
393 | 390 | * }; |
394 | | - * const tableHlc = '03E3B------mmxrx'; |
395 | 391 | * |
396 | | - * console.log(getTableHash(rowHashes, tableHlc)); |
397 | | - * // -> 2544679909 |
| 392 | + * console.log(getTableHash(rowHashes)); |
| 393 | + * // -> 4262151841 |
398 | 394 | * ``` |
399 | 395 | * @category Hash |
400 | 396 | * @since v6.2.0 |
|
413 | 409 | * import {getRowInTableHash} from 'tinybase'; |
414 | 410 | * |
415 | 411 | * const rowId = 'fido'; |
416 | | - * const rowHash = 703486916; // hash of its contents |
| 412 | + * const rowHash = 1810444343; // hash of its contents |
417 | 413 | * |
418 | 414 | * console.log(getRowInTableHash(rowId, rowHash)); |
419 | | - * // -> 1600649469 |
| 415 | + * // -> 4262151841 |
420 | 416 | * ``` |
421 | 417 | * @category Hash |
422 | 418 | * @since v6.2.0 |
|
425 | 421 |
|
426 | 422 | /** |
427 | 423 | * The getRowHash function returns a hash for a single Row in a Table, based on |
428 | | - * each Cell and the HLC of the Row. |
| 424 | + * each Cell Id and hash. |
429 | 425 | * @param cellHashes An object containing each Cell Id and its hash. |
430 | | - * @param rowHlc The HLC of the Row. |
431 | 426 | * @returns A hash of the Row. |
432 | 427 | * @example |
433 | 428 | * This example gets the hash of a Row. |
|
437 | 432 | * const cellHashes = { |
438 | 433 | * 'species': 3002200796, // hash of 'dog' and '03E3B------mmxrx' |
439 | 434 | * }; |
440 | | - * const rowHlc = '03E3B------mmxrx'; |
441 | 435 | * |
442 | | - * console.log(getRowHash(cellHashes, rowHlc)); |
443 | | - * // -> 703486916 |
| 436 | + * console.log(getRowHash(cellHashes)); |
| 437 | + * // -> 1810444343 |
444 | 438 | * ``` |
445 | 439 | * @category Hash |
446 | 440 | * @since v6.2.0 |
|
493 | 487 |
|
494 | 488 | /** |
495 | 489 | * The getValuesHash function returns a hash for a Values object, based on each |
496 | | - * value and the HLC of the Values. |
| 490 | + * Value Id and hash. |
497 | 491 | * @param valueHashes An object containing each Value Id and its hash. |
498 | | - * @param valuesHlc The HLC of the Values. |
499 | 492 | * @returns A hash of the Values. |
500 | 493 | * @example |
501 | 494 | * This example gets the hash of a Values object. |
|
505 | 498 | * const valueHashes = { |
506 | 499 | * meaningOfLife: 312420374, // hash of 42 and '03E3B------mmxrx' |
507 | 500 | * }; |
508 | | - * const valuesHlc = '03E3B------mmxrx'; |
509 | 501 | * |
510 | | - * console.log(getValuesHash(valueHashes, valuesHlc)); |
511 | | - * // -> 3680840875 |
| 502 | + * console.log(getValuesHash(valueHashes)); |
| 503 | + * // -> 4229195646 |
512 | 504 | * ``` |
513 | 505 | * @category Hash |
514 | 506 | * @since v6.2.0 |
|
0 commit comments