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

@augment-vir/common

Package Overview
Dependencies
Maintainers
1
Versions
222
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@augment-vir/common - npm Package Compare versions

Comparing version 13.2.4 to 13.3.0

18

dist/cjs/augments/tuple.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isLengthAtLeast = void 0;
exports.assertLengthAtLeast = exports.isLengthAtLeast = void 0;
function isLengthAtLeast(array, length) {
return array.length >= length;
try {
assertLengthAtLeast(array, length);
return true;
}
catch (error) {
return false;
}
}
exports.isLengthAtLeast = isLengthAtLeast;
function assertLengthAtLeast(array, length, arrayName) {
if (array.length < length) {
throw new Error(arrayName
? `'${arrayName}' is not at least '${length}' in length.`
: `Array is not at least '${length}' in length.`);
}
}
exports.assertLengthAtLeast = assertLengthAtLeast;
export function isLengthAtLeast(array, length) {
return array.length >= length;
try {
assertLengthAtLeast(array, length);
return true;
}
catch (error) {
return false;
}
}
export function assertLengthAtLeast(array, length, arrayName) {
if (array.length < length) {
throw new Error(arrayName
? `'${arrayName}' is not at least '${length}' in length.`
: `Array is not at least '${length}' in length.`);
}
}

@@ -8,2 +8,3 @@ export type Tuple<ArrayElementGeneric, LengthGeneric extends number> = LengthGeneric extends LengthGeneric ? number extends LengthGeneric ? ArrayElementGeneric[] : _TupleOf<ArrayElementGeneric, LengthGeneric, []> : never;

export declare function isLengthAtLeast<ArrayElementGeneric, LengthGeneric extends number>(array: ReadonlyArray<ArrayElementGeneric | undefined>, length: LengthGeneric): array is AtLeastTuple<ArrayElementGeneric, LengthGeneric>;
export declare function assertLengthAtLeast<ArrayElementGeneric, LengthGeneric extends number>(array: ReadonlyArray<ArrayElementGeneric | undefined>, length: LengthGeneric, arrayName?: string): asserts array is AtLeastTuple<ArrayElementGeneric, LengthGeneric>;
export {};

2

package.json
{
"name": "@augment-vir/common",
"version": "13.2.4",
"version": "13.3.0",
"homepage": "https://github.com/electrovir/augment-vir/tree/main/packages/common",

@@ -5,0 +5,0 @@ "bugs": {

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