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
58
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 8.0.28 to 8.0.29

lib/types/types.js

2

index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Url = exports.Ip = exports.Crypto = exports.Errors = exports.Functions = exports.Reflector = exports.Deferred = exports.Enums = exports.Files = exports.Util = exports.Time = exports.Promises = exports.Guid = exports.Classes = exports.Arrays = exports.Objects = exports.Hash = exports.Strings = exports.Numbers = exports._ = exports.date = void 0;
const tslib_1 = require("tslib");
const numbers_1 = require("./lib/numbers");

@@ -47,2 +48,3 @@ Object.defineProperty(exports, "Numbers", { enumerable: true, get: function () { return numbers_1.Numbers; } });

exports.default = util_1.Util;
tslib_1.__exportStar(require("./lib/types/types"), exports);
//# sourceMappingURL=index.js.map

@@ -25,2 +25,4 @@ import {Numbers} from "./lib/numbers"

export * from "./lib/types/types"
export {

@@ -27,0 +29,0 @@ date,

@@ -39,3 +39,3 @@ "use strict";

static random(arr) {
if (!arr) {
if (!arr || !arr.length) {
return null;

@@ -48,2 +48,8 @@ }

}
static randomItems(arr, n) {
if (!arr || !arr.length) {
return [];
}
return Arrays.sortBy(arr, () => 0.5 - Math.random()).slice(0, n);
}
static removeBy(list, criteria) {

@@ -50,0 +56,0 @@ if (!list || !list.length) {

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

if (!arr) {
if (!arr || !arr.length) {
return null;

@@ -59,3 +59,11 @@ }

public static randomItems<T>(arr: T[], n: number): T[] {
if (!arr || !arr.length) {
return [];
}
return Arrays.sortBy(arr, () => 0.5 - Math.random()).slice(0, n)
}
public static removeBy<T>(list: T[], criteria: (value: T, i?: number) => boolean): void {

@@ -62,0 +70,0 @@ if (!list || !list.length) {

2

package.json

@@ -20,3 +20,3 @@ {

"main": "./index.js",
"version": "8.0.28",
"version": "8.0.29",
"license": "MIT",

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

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