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

just-shuffle

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

just-shuffle - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

12

index.js

@@ -6,11 +6,11 @@ module.exports = shuffle;

shuffle([1]); // [1]
shuffle(); // undefined
shuffle(undefined); // undefined
shuffle(null); // undefined
shuffle({}); // undefined
shuffle(); // throws
shuffle(undefined); // throws
shuffle(null); // throws
shuffle({}); // throws
*/
function shuffle(arr) {
if (!arr || !('length' in arr)) {
return undefined;
if (!Array.isArray(arr)) {
throw new Error('expected an array');
}

@@ -17,0 +17,0 @@ var len = arr.length;

{
"name": "just-shuffle",
"version": "1.0.0",
"version": "2.0.0",
"description": "return the elements of an array in random order",

@@ -10,9 +10,3 @@ "main": "index.js",

"repository": "https://github.com/angus-c/just",
"keywords": [
"array",
"random",
"shuffle",
"no-dependencies",
"just"
],
"keywords": ["array", "random", "shuffle", "no-dependencies", "just"],
"author": "Angus Croll",

@@ -19,0 +13,0 @@ "license": "MIT",

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