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

mirror-drive

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mirror-drive - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

10

index.js

@@ -1,2 +0,2 @@

const deepEqual = require('deep-equal')
const sameData = require('same-data')
const streamEquals = require('binary-stream-equals')

@@ -17,2 +17,4 @@

this.count = { files: 0, add: 0, remove: 0, change: 0 }
this.bytesRemoved = 0
this.bytesAdded = 0
this.iterator = this._mirror()

@@ -41,2 +43,3 @@ }

this.count.remove++
this.bytesRemoved += blobLength(dstEntry)
yield { op: 'remove', key, bytesRemoved: blobLength(dstEntry), bytesAdded: 0 }

@@ -58,5 +61,8 @@

this.count.change++
this.bytesRemoved += blobLength(dstEntry)
this.bytesAdded += blobLength(srcEntry)
yield { op: 'change', key, bytesRemoved: blobLength(dstEntry), bytesAdded: blobLength(srcEntry) }
} else {
this.count.add++
this.bytesAdded += blobLength(srcEntry)
yield { op: 'add', key, bytesRemoved: 0, bytesAdded: blobLength(srcEntry) }

@@ -138,5 +144,5 @@ }

const noMetadata = !srcMetadata && !dstMetadata
const identicalMetadata = !!(srcMetadata && dstMetadata && deepEqual(srcMetadata, dstMetadata))
const identicalMetadata = !!(srcMetadata && dstMetadata && sameData(srcMetadata, dstMetadata))
return noMetadata || identicalMetadata
}

4

package.json
{
"name": "mirror-drive",
"version": "1.0.3",
"version": "1.0.4",
"description": "Mirror a hyperdrive or localdrive into another one",

@@ -33,4 +33,4 @@ "main": "index.js",

"binary-stream-equals": "^1.0.0",
"deep-equal": "^2.0.5"
"same-data": "^1.0.0"
}
}
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