npm.io
0.1.2 • Published 2 years ago

@types/jsum

Licence
MIT
Version
0.1.2
Deps
0
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/jsum

Summary

This package contains type definitions for jsum (https://github.com/fraunhoferfokus/JSum#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jsum.

index.d.ts

/**
 * Creates hash of given JSON object.
 *
 * @param obj JSON object
 * @param hashAlgorithm hash algorithm (e.g. SHA256)
 * @param encoding hash encoding (e.g. base64) or none for buffer
 */
export function digest(obj: any, hashAlgorithm: string, encoding: string): string;

/**
 * Stringifies a JSON object (not any random JS object).
 *
 * It should be noted that JS objects can have members of
 * specific type (e.g. function), that are not supported
 * by JSON.
 *
 * @param obj JSON object
 * @returns stringified JSON object.
 */
export function stringify(obj: any): string;

Additional Details

  • Last updated: Tue, 07 Nov 2023 0337 GMT
  • Dependencies: none

Credits

These definitions were written by David Uzumeri.