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

ampersand-collection-lodash-mixin

Package Overview
Dependencies
Maintainers
3
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ampersand-collection-lodash-mixin - npm Package Compare versions

Comparing version 2.0.1 to 3.0.0

.validate.json

73

ampersand-collection-lodash-mixin.js
/*$AMPERSAND_VERSION*/
var isFunction = require('lodash.isfunction');
var isFunction = require('lodash/isfunction');
var _ = {
countBy: require('lodash.countby'),
difference: require('lodash.difference'),
drop: require('lodash.drop'),
each: require('lodash.foreach'),
every: require('lodash.every'),
filter: require('lodash.filter'),
find: require('lodash.find'),
forEach: require('lodash.foreach'),
groupBy: require('lodash.groupby'),
includes: require('lodash.includes'),
indexBy: require('lodash.indexby'),
indexOf: require('lodash.indexof'),
initial: require('lodash.initial'),
invoke: require('lodash.invoke'),
isEmpty: require('lodash.isempty'),
lastIndexOf: require('lodash.lastindexof'),
map: require('lodash.map'),
max: require('lodash.max'),
min: require('lodash.min'),
partition: require('lodash.partition'),
reduce: require('lodash.reduce'),
reduceRight: require('lodash.reduceright'),
reject: require('lodash.reject'),
rest: require('lodash.rest'),
sample: require('lodash.sample'),
shuffle: require('lodash.shuffle'),
some: require('lodash.some'),
sortBy: require('lodash.sortby'),
take: require('lodash.take'),
without: require('lodash.without')
countBy: require('lodash/countBy'),
difference: require('lodash/difference'),
drop: require('lodash/drop'),
each: require('lodash/forEach'),
every: require('lodash/every'),
filter: require('lodash/filter'),
find: require('lodash/find'),
forEach: require('lodash/forEach'),
groupBy: require('lodash/groupBy'),
includes: require('lodash/includes'),
indexBy: require('lodash/keyBy'),
indexOf: require('lodash/indexOf'),
initial: require('lodash/initial'),
invoke: require('lodash/invokeMap'),
invokeMap: require('lodash/invokeMap'),
isEmpty: require('lodash/isEmpty'),
lastIndexOf: require('lodash/lastIndexOf'),
keyBy: require('lodash/keyBy'),
map: require('lodash/map'),
max: require('lodash/max'),
min: require('lodash/min'),
partition: require('lodash/partition'),
reduce: require('lodash/reduce'),
reduceRight: require('lodash/reduceRight'),
reject: require('lodash/reject'),
rest: require('lodash/tail'),
sample: require('lodash/sample'),
shuffle: require('lodash/shuffle'),
some: require('lodash/some'),
sortBy: require('lodash/sortBy'),
tail: require('lodash/tail'),
take: require('lodash/take'),
without: require('lodash/without')
};

@@ -41,5 +44,5 @@ var slice = [].slice;

var methods = ['forEach', 'each', 'map', 'reduce', 'reduceRight', 'find',
'filter', 'reject', 'every', 'some', 'includes', 'invoke', 'max', 'min',
'take', 'initial', 'rest', 'drop', 'without', 'difference', 'indexOf', 'shuffle',
'lastIndexOf', 'isEmpty', 'sample', 'partition'
'filter', 'reject', 'every', 'some', 'includes', 'invoke', 'invokeMap',
'max', 'min', 'take', 'initial', 'rest', 'drop', 'without', 'difference',
'indexOf', 'shuffle', 'lastIndexOf', 'isEmpty', 'sample', 'partition', 'tail'
];

@@ -58,3 +61,3 @@

// lodash methods that take a property name as an argument.
var attributeMethods = ['groupBy', 'countBy', 'sortBy', 'indexBy'];
var attributeMethods = ['groupBy', 'countBy', 'sortBy', 'indexBy', 'keyBy'];

@@ -61,0 +64,0 @@ // Use attributes instead of properties.

{
"name": "ampersand-collection-lodash-mixin",
"description": "A mixin for extending ampersand-collection with lodash methods.",
"version": "2.0.1",
"version": "3.0.0",
"author": "Henrik Joreteg <henrik@andyet.net>",

@@ -16,44 +16,12 @@ "browserify": {

"ampersand-version": "^1.0.0",
"lodash.countby": "^3.1.0",
"lodash.difference": "^3.1.0",
"lodash.drop": "^3.0.0",
"lodash.every": "^3.2.0",
"lodash.filter": "^3.1.0",
"lodash.find": "^3.2.0",
"lodash.foreach": "^3.0.2",
"lodash.groupby": "^3.1.0",
"lodash.includes": "^3.1.0",
"lodash.indexby": "^3.1.0",
"lodash.indexof": "^3.0.2",
"lodash.initial": "^3.0.0",
"lodash.invoke": "^3.1.0",
"lodash.isempty": "^3.0.1",
"lodash.isfunction": "^3.0.2",
"lodash.lastindexof": "^3.0.2",
"lodash.map": "^3.1.0",
"lodash.max": "^3.2.0",
"lodash.min": "^3.2.0",
"lodash.partition": "^3.1.0",
"lodash.reduce": "^3.1.0",
"lodash.reduceright": "^3.1.0",
"lodash.reject": "^3.1.0",
"lodash.rest": "^3.0.0",
"lodash.sample": "^3.0.0",
"lodash.shuffle": "^3.0.0",
"lodash.some": "^3.2.0",
"lodash.sortby": "^3.1.0",
"lodash.take": "^3.0.0",
"lodash.without": "^3.1.0"
"lodash": "^4.11.1"
},
"devDependencies": {
"ampersand-collection": "^1.0.0",
"ampersand-state": "^4.3.2",
"browserify": "^9.0.4",
"ampersand-state": "^5.0.1",
"jshint": "^2.5.5",
"phantomjs": "^1.9.7-15",
"precommit-hook": "^2.0.1",
"run-browser": "^2.0.2",
"tap-spec": "^2.2.2",
"tape": "^3.5.0",
"tape-run": "^1.0.0"
"phantomjs": "^2.1.7",
"precommit-hook": "^3.0.0",
"tape": "^4.5.1",
"zuul": "^3.9.0"
},

@@ -74,6 +42,8 @@ "homepage": "https://github.com/ampersandjs/ampersand-collection-lodash-mixin",

"scripts": {
"test": "browserify test/index.js | tape-run | tap-spec",
"start": "zuul --local -- test/index.js",
"test": "zuul --phantom -- test/index.js",
"test-ci": "zuul -- test/index.js",
"lint": "jshint .",
"start": "run-browser test/index.js",
"list": "node -e \"console.log(Object.keys(require('./ampersand-collection-lodash-mixin')).sort().join(', '))\""
"list": "node -e \"console.log(Object.keys(require('./ampersand-collection-lodash-mixin')).sort().join(', '))\"",
"validate": "npm ls"
},

@@ -83,19 +53,3 @@ "pre-commit": [

"test"
],
"testling": {
"files": "test/*.js",
"browsers": [
"ie/9..latest",
"firefox/17..latest",
"firefox/nightly",
"chrome/22..latest",
"chrome/canary",
"opera/12..latest",
"opera/next",
"safari/5.1..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2..latest"
]
}
]
}

@@ -15,5 +15,6 @@ # ampersand-collection-lodash-mixin

countBy, difference, drop, each, every, filter, find, findWhere, first,
forEach, groupBy, includes, indexBy, indexOf, initial, invoke, isEmpty, last,
lastIndexOf, map, max, min, partition, pluck, reduce, reduceRight, reject,
rest, sample, shuffle, size, some, sortBy, take, where, without
forEach, groupBy, includes, indexBy, indexOf, initial, invoke, invokeMap,
isEmpty, keyBy, last, lastIndexOf, map, max, min, partition, pluck, reduce,
reduceRight, reject, rest, sample, shuffle, size, some, sortBy, take,
tail, where, without
```

@@ -20,0 +21,0 @@

@@ -5,3 +5,3 @@ var test = require('tape');

var AmpersandLodashMixins = require('../ampersand-collection-lodash-mixin');
var without = require('lodash.without');
var without = require('lodash/without');
var collection;

@@ -23,7 +23,7 @@

'reduceRight', 'find', 'filter',
'reject', 'every', 'some', 'includes', 'invoke',
'max', 'min', 'size', 'first', 'take', 'initial', 'rest',
'reject', 'every', 'some', 'includes', 'invoke', 'invokeMap',
'max', 'min', 'size', 'first', 'take', 'initial', 'rest', 'tail',
'drop', 'last', 'without', 'difference', 'indexOf', 'shuffle',
'lastIndexOf', 'isEmpty', 'sample', 'partition',
'groupBy', 'countBy', 'sortBy', 'indexBy'
'groupBy', 'countBy', 'sortBy', 'indexBy', 'keyBy'
];

@@ -43,3 +43,3 @@

]);
without(methods, 'groupBy', 'countBy', 'sortBy', 'indexBy').forEach(function (method) {
without(methods, 'groupBy', 'countBy', 'sortBy', 'indexBy', 'keyBy').forEach(function (method) {
t.doesNotThrow(function () { collection[method](); }, method + ' should be callable');

@@ -50,3 +50,3 @@ });

test('groupBy, countBy, sortBy, indexBy should be callable on the collection instance', function (t) {
test('groupBy, countBy, sortBy, indexBy, keyBy should be callable on the collection instance', function (t) {
var collection = new Collection([

@@ -56,3 +56,3 @@ { id: 1, foo: 'baz', bar: 'baz' },

]);
['groupBy', 'countBy', 'sortBy', 'indexBy'].forEach(function (method) {
['groupBy', 'countBy', 'sortBy', 'indexBy', 'keyBy'].forEach(function (method) {
t.doesNotThrow(function () {

@@ -59,0 +59,0 @@ collection[method]('foo');

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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