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

hyperdiff

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hyperdiff - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

10

CHANGELOG.md

@@ -0,1 +1,11 @@

<a name="2.0.0"></a>
# 2.0.0 (2017-01-27)
* Add bench results ([b9d30aa](https://github.com/kikobeats/hyperdiff/commit/b9d30aa))
* Add test ([aded89f](https://github.com/kikobeats/hyperdiff/commit/aded89f))
* Better id selector ([871c895](https://github.com/kikobeats/hyperdiff/commit/871c895))
* Support multiple ids ([8e8f36a](https://github.com/kikobeats/hyperdiff/commit/8e8f36a))
<a name="1.0.0"></a>

@@ -2,0 +12,0 @@ # 1.0.0 (2017-01-03)

12

package.json

@@ -5,3 +5,3 @@ {

"homepage": "https://github.com/Kikobeats/hyperdiff",
"version": "1.0.0",
"version": "2.0.0",
"main": "index.js",

@@ -21,9 +21,13 @@ "author": {

"keywords": [
"Added",
"Array",
"Delta",
"Diff",
"Difference",
"Diff",
"Delta",
"Added",
"Removed"
],
"dependencies": {
"lodash.difference": "~4.5.0",
"lodash.pullat": "~4.6.0"
},
"devDependencies": {

@@ -30,0 +34,0 @@ "coveralls": "latest",

@@ -11,3 +11,3 @@ # hyperdiff

> Find common, removed and added element between two arrays.
> Find common, removed and added element between two collections.

@@ -22,3 +22,3 @@ ## Install

Using flat arrays:
Using flat collections:

@@ -70,5 +70,15 @@ ```js

## Benchmark
```bash
❯ node bench.js
simpleArrayDiff*1000: 143.742ms
hyperDiff*1000: 80.234ms
simpleArrayDiff*1000: 143.405ms
hyperDiff*1000: 75.803ms
```
## API
### hyperdiff(orig, dist, [id])
### hyperdiff(orig, dist, [ids])

@@ -89,8 +99,8 @@ #### orig

#### id
#### ids
*Required*<br>
Type: `string|function`
Type: `array`
In the case that you provide an `Array` of `Object`, you need to specify the `key` to be used as `id`.
In the case that you provide an `Array` of `Object`'s, you need to specify the `key`'s to be used as `id`.

@@ -97,0 +107,0 @@ ## License

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