New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@casret/dedupe

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

@casret/dedupe - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

4

index.js

@@ -15,3 +15,5 @@ const Strategies = {

function dedupe(items, opts) {
const strategy = opts.strategy || Strategies.SortedItems
// If the strategy passed in null (which is easy if use a bad key on Strategies)
// then we should raise instead of defaulting
const strategy = ('strategy' in opts) ? opts.strategy : Strategies.SortedItems
if (strategy !== Strategies.SortedItems &&

@@ -18,0 +20,0 @@ strategy !== Strategies.SortedKeys &&

@@ -65,1 +65,5 @@ const {Strategies, dedupe} = require("./index")

})
test("Should throw an exception if you use a bad strategy", () => {
expect(() => dedupe([], {strategy: Strategies.NoSuchStrategy})).toThrow()
})
{
"name": "@casret/dedupe",
"version": "0.1.0",
"version": "0.2.0",
"description": "Dedupe utilities for pipedream",

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

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