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

lodash.shuffle

Package Overview
Dependencies
Maintainers
3
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lodash.shuffle - npm Package Compare versions

Comparing version 3.1.0 to 4.0.0

LICENSE

18

index.js
/**
* lodash 3.1.0 (Custom Build) <https://lodash.com/>
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
* lodash 4.0.0 (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license <https://lodash.com/license>
*/
var sample = require('lodash.sample');
var sampleSize = require('lodash.samplesize');
/** Used as references for `-Infinity` and `Infinity`. */
var POSITIVE_INFINITY = Number.POSITIVE_INFINITY;
/** Used as references for the maximum length and index of an array. */
var MAX_ARRAY_LENGTH = 4294967295;

@@ -21,3 +21,3 @@ /**

* @category Collection
* @param {Array|Object|string} collection The collection to shuffle.
* @param {Array|Object} collection The collection to shuffle.
* @returns {Array} Returns the new shuffled array.

@@ -30,5 +30,5 @@ * @example

function shuffle(collection) {
return sample(collection, POSITIVE_INFINITY);
return sampleSize(collection, MAX_ARRAY_LENGTH);
}
module.exports = shuffle;
{
"name": "lodash.shuffle",
"version": "3.1.0",
"description": "The modern build of lodash’s `_.shuffle` as a module.",
"version": "4.0.0",
"description": "The lodash method `_.shuffle` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
"keywords": "lodash, lodash-modularized, stdlib, util",
"keywords": "lodash, lodash-modularized, stdlib, util, shuffle",
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
"Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)",
"Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
"Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
"Blaine Bublitz <blaine@iceddev.com> (https://github.com/phated)",
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"

@@ -20,4 +18,4 @@ ],

"dependencies": {
"lodash.sample": "^3.0.0"
"lodash.samplesize": "^4.0.0"
}
}

@@ -1,4 +0,4 @@

# lodash.shuffle v3.1.0
# lodash.shuffle v4.0.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.shuffle` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
The [lodash](https://lodash.com/) method `_.shuffle` exported as a [Node.js](https://nodejs.org/) module.

@@ -8,3 +8,2 @@ ## Installation

Using npm:
```bash

@@ -15,4 +14,3 @@ $ {sudo -H} npm i -g npm

In Node.js/io.js:
In Node.js:
```js

@@ -22,2 +20,2 @@ var shuffle = require('lodash.shuffle');

See the [documentation](https://lodash.com/docs#shuffle) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.shuffle) for more details.
See the [documentation](https://lodash.com/docs#shuffle) or [package source](https://github.com/lodash/lodash/blob/4.0.0-npm-packages/lodash.shuffle) for more details.
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