Socket
Socket
Sign inDemoInstall

multiformats

Package Overview
Dependencies
0
Maintainers
2
Versions
147
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 9.6.1 to 9.6.2

4

cjs/src/hashes/identity.js

@@ -10,6 +10,8 @@ 'use strict';

const name = 'identity';
const digest = input => digest$1.create(code, bytes.coerce(input));
const encode = bytes.coerce;
const digest = input => digest$1.create(code, encode(input));
const identity = {
code,
name,
encode,
digest

@@ -16,0 +18,0 @@ };

@@ -5,7 +5,9 @@ import { coerce } from '../bytes.js';

const name = 'identity';
const digest = input => Digest.create(code, coerce(input));
const encode = coerce;
const digest = input => Digest.create(code, encode(input));
export const identity = {
code,
name,
encode,
digest
};
{
"name": "multiformats",
"version": "9.6.1",
"version": "9.6.2",
"description": "Interface for multihash, multicodec, multibase and CID",

@@ -5,0 +5,0 @@ "main": "./cjs/src/index.js",

@@ -7,2 +7,5 @@ import { coerce } from '../bytes.js'

/** @type {(input:Uint8Array) => Uint8Array} */
const encode = coerce
/**

@@ -12,5 +15,4 @@ * @param {Uint8Array} input

*/
const digest = (input) => Digest.create(code, coerce(input))
const digest = (input) => Digest.create(code, encode(input))
/** @type {import('./interface').SyncMultihashHasher<typeof code>} */
export const identity = { code, name, digest }
export const identity = { code, name, encode, digest }

@@ -7,3 +7,8 @@ import { CID } from "./index.js";

export const hashes: {
identity: import("./hashes/interface.js").SyncMultihashHasher<0>;
identity: {
code: number;
name: string;
encode: (input: Uint8Array) => Uint8Array;
digest: (input: Uint8Array) => digest.Digest<0, number>;
};
sha256: hasher.Hasher<"sha2-256", 18>;

@@ -10,0 +15,0 @@ sha512: hasher.Hasher<"sha2-512", 19>;

@@ -1,5 +0,18 @@

/** @type {import('./interface').SyncMultihashHasher<typeof code>} */
export const identity: import('./interface').SyncMultihashHasher<typeof code>;
export namespace identity {
export { code };
export { name };
export { encode };
export { digest };
}
declare const code: 0;
declare const name: "identity";
/** @type {(input:Uint8Array) => Uint8Array} */
declare const encode: (input: Uint8Array) => Uint8Array;
/**
* @param {Uint8Array} input
* @returns {Digest.Digest<typeof code, number>}
*/
declare function digest(input: Uint8Array): Digest.Digest<typeof code, number>;
import * as Digest from "./digest.js";
export {};
//# sourceMappingURL=identity.d.ts.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc