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

@namely/underly

Package Overview
Dependencies
Maintainers
6
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@namely/underly - npm Package Compare versions

Comparing version 0.0.0 to 0.1.0

4

dist/index.es.js

@@ -227,3 +227,3 @@ var isNumber = function isNumber(value) {

return function (input) {
return input.reduce(function (a, b) {
return input.length === 0 ? undefined : input.reduce(function (a, b) {
return compare(b, a) > 0 ? b : a;

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

return function (input) {
return input.reduce(function (a, b) {
return input.length === 0 ? undefined : input.reduce(function (a, b) {
return negCompare(b, a) > 0 ? b : a;

@@ -319,0 +319,0 @@ });

@@ -231,3 +231,3 @@ 'use strict';

return function (input) {
return input.reduce(function (a, b) {
return input.length === 0 ? undefined : input.reduce(function (a, b) {
return compare(b, a) > 0 ? b : a;

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

return function (input) {
return input.reduce(function (a, b) {
return input.length === 0 ? undefined : input.reduce(function (a, b) {
return negCompare(b, a) > 0 ? b : a;

@@ -323,0 +323,0 @@ });

{
"name": "@namely/underly",
"version": "0.0.0",
"version": "0.1.0",
"description": "Lightweight functional helpers",

@@ -5,0 +5,0 @@ "author": "Vince Malone <vince.malone@namely.com>",

@@ -89,1 +89,5 @@ import test, { Macro } from 'ava';

);
test('empty', t => {
t.deepEqual(max()([]), undefined);
});

@@ -33,3 +33,5 @@ interface Compare<T> {

*/
export const max = <T = number>(compare: Compare<T> = defaultCompare) => (input: T[]) =>
input.reduce((a: T, b: T) => (compare(b, a) > 0 ? b : a));
export const max = <T = number>(compare: Compare<T> = defaultCompare) => (
input: T[],
): T | undefined =>
input.length === 0 ? undefined : input.reduce((a: T, b: T) => (compare(b, a) > 0 ? b : a));

@@ -89,1 +89,5 @@ import test, { Macro } from 'ava';

);
test('empty', t => {
t.deepEqual(min()([]), undefined);
});

@@ -37,3 +37,4 @@ import { neg } from './neg';

const negCompare = neg(compare);
return (input: T[]) => input.reduce((a, b) => (negCompare(b, a) > 0 ? b : a));
return (input: T[]) =>
input.length === 0 ? undefined : input.reduce((a, b) => (negCompare(b, a) > 0 ? b : a));
};

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