Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rev-hash

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rev-hash - npm Package Compare versions

Comparing version 4.0.0 to 4.1.0

4

index.d.ts

@@ -1,3 +0,1 @@

import {Buffer} from 'node:buffer';
/**

@@ -20,2 +18,2 @@ Create a hash for file revving.

*/
export default function revisionHash(data: Buffer | string): string;
export default function revisionHash(data: Uint8Array | string): string;
import crypto from 'node:crypto';
import {Buffer} from 'node:buffer';
import {types} from 'node:util';
export default function revisionHash(data) {
if (typeof data !== 'string' && !Buffer.isBuffer(data)) {
throw new TypeError('Expected a Buffer or string');
if (typeof data !== 'string' && !types.isUint8Array(data)) {
throw new TypeError('Expected a Uint8Array or string');
}

@@ -8,0 +8,0 @@

{
"name": "rev-hash",
"version": "4.0.0",
"version": "4.1.0",
"description": "Create a hash for file revving",

@@ -19,3 +19,4 @@ "license": "MIT",

"scripts": {
"test": "xo && ava && tsd"
"//test": "xo && ava && tsd",
"test": "ava && tsd"
},

@@ -22,0 +23,0 @@ "files": [

@@ -34,4 +34,4 @@ # rev-hash

Type: `Buffer | string`
Type: `Uint8Array | string`
The data to create a hash from.
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc