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

appolo-utils

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

appolo-utils - npm Package Compare versions

Comparing version 0.0.37 to 0.0.38

17

lib/arrays.js

@@ -75,2 +75,19 @@ "use strict";

}
static sortBy(arr, criteria) {
arr = Arrays.clone(arr);
arr.sort((a, b) => {
let valueA = criteria(a), valueB = criteria(b);
return (valueA > valueB) ? 1 : ((valueB > valueA) ? -1 : 0);
});
return arr;
}
static sort(arr) {
let criteria = ((value) => value);
arr = Arrays.clone(arr);
arr.sort((a, b) => {
let valueA = criteria(a), valueB = criteria(b);
return (valueA > valueB) ? 1 : ((valueB > valueA) ? -1 : 0);
});
return arr;
}
static uniqBy(arr, criteria) {

@@ -77,0 +94,0 @@ let dic = new Map(), out = [];

@@ -111,3 +111,26 @@ import {Classes} from "./classes";

public static sortBy<T>(arr: T[], criteria: (value: T) => any): T[] {
arr = Arrays.clone(arr);
arr.sort((a, b) => {
let valueA = criteria(a), valueB = criteria(b);
return (valueA > valueB) ? 1 : ((valueB > valueA) ? -1 : 0);
});
return arr;
}
public static sort<T>(arr: T[]): T[] {
let criteria = ((value) => value);
arr = Arrays.clone(arr);
arr.sort((a, b) => {
let valueA = criteria(a), valueB = criteria(b);
return (valueA > valueB) ? 1 : ((valueB > valueA) ? -1 : 0);
});
return arr;
}
public static uniqBy<T>(arr: T[], criteria: (value: T, i?: number) => any): T[] {

@@ -114,0 +137,0 @@ let dic = new Map<any, 1>(), out = [];

2

package.json

@@ -17,3 +17,3 @@ {

"main": "./index.js",
"version": "0.0.37",
"version": "0.0.38",
"license": "MIT",

@@ -20,0 +20,0 @@ "repository": {

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