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

absurdum

Package Overview
Dependencies
Maintainers
1
Versions
177
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

absurdum - npm Package Compare versions

Comparing version

to
0.13.0

src/arrays/compact.js

2

package.json
{
"name": "absurdum",
"version": "0.12.0",
"version": "0.13.0",
"description": "Reducio Ad Absurdum - The Riduculous Application of Reduce",

@@ -5,0 +5,0 @@ "keywords": [

@@ -23,2 +23,4 @@ [![npm](https://img.shields.io/npm/v/absurdum.svg)](https://www.npmjs.com/package/absurdum)

- [chunk][arrays.chunk]
- [compact][arrays.compact]
- [filter][arrays.filter]

@@ -30,3 +32,4 @@ - [map][arrays.map]

[arrays]: ./docs/arrays.md
[arrays.chunk]: ./docs/arrays/md
[arrays.chunk]: ./docs/arrays.md#arrayschunkarray-size1
[arrays.compact]: ./docs/arrays.md#arrayscompactarray
[arrays.filter]: ./docs/arrays.md#arraysfilterarray-predicate

@@ -33,0 +36,0 @@ [arrays.map]: ./docs/arrays.md#arraysmaparray-func

import test from 'tape';
import { arrays } from '../../index.js';
// test(`arrays.chunk(array) - should return a chunk for each item in the array`, t => {
// const expect = [[1], [2], [3], [4]];
// const result = arrays.chunk([1, 2, 3, 4]);
test(`arrays.chunk(array) - should return a chunk for each item in the array`, t => {
const expect = [[1], [2], [3], [4]];
const result = arrays.chunk([1, 2, 3, 4]);
// t.equal(Object.prototype.toString.call(result), '[object Array]', 'return type');
// t.equal(result.length, 4, 'output length');
// t.deepEqual(result, expect, 'output value');
t.equal(Object.prototype.toString.call(result), '[object Array]', 'return type');
t.equal(result.length, 4, 'output length');
t.deepEqual(result, expect, 'output value');
// t.end();
// });
t.end();
});

@@ -15,0 +15,0 @@ test(`arrays.chunk(array, size) - should return an array of chunks of the specified size`, t => {

export { chunk } from "./chunk.js";
export { compact } from "./compact.js";
export { filter } from './filter.js';

@@ -3,0 +4,0 @@ export { map } from './map.js';