🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@rg-dev/stdlib

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rg-dev/stdlib - npm Package Compare versions

Comparing version
1.0.11
to
1.0.12
+6
-6
lib/common-env.cjs

@@ -64,14 +64,14 @@ var __defProp = Object.defineProperty;

var Optional = class _Optional {
value;
constructor(value) {
this.value = value;
}
value = void 0;
static of(val) {
return new _Optional(val);
}
orElseThrow(msg) {
if (this.value == void 0)
if (this.value === void 0)
throw new Error(msg || "Value is empty");
return this.value;
}
static of(val) {
return new _Optional(val);
}
setValue(newValue) {

@@ -85,3 +85,3 @@ this.value = newValue;

ifPresent(action) {
if (this.value == void 0)
if (this.value === void 0)
return;

@@ -88,0 +88,0 @@ try {

@@ -12,8 +12,8 @@ type Options = {

type AsyncReturnType<T extends (...args: any) => any> = Awaited<ReturnType<T>>;
type MaybeFunction = (() => void) | undefined;
type MaybeFunction = ((...args: any) => void) | undefined;
declare class Optional<T> {
private value;
private constructor();
private value;
static of<T>(val: T): Optional<T>;
orElseThrow(msg?: string): T;
static of<T>(val: T): Optional<T>;
setValue(newValue: T): this;

@@ -20,0 +20,0 @@ getValue(): T | undefined;

@@ -12,8 +12,8 @@ type Options = {

type AsyncReturnType<T extends (...args: any) => any> = Awaited<ReturnType<T>>;
type MaybeFunction = (() => void) | undefined;
type MaybeFunction = ((...args: any) => void) | undefined;
declare class Optional<T> {
private value;
private constructor();
private value;
static of<T>(val: T): Optional<T>;
orElseThrow(msg?: string): T;
static of<T>(val: T): Optional<T>;
setValue(newValue: T): this;

@@ -20,0 +20,0 @@ getValue(): T | undefined;

@@ -31,14 +31,14 @@ // src/promise-retry.ts

var Optional = class _Optional {
value;
constructor(value) {
this.value = value;
}
value = void 0;
static of(val) {
return new _Optional(val);
}
orElseThrow(msg) {
if (this.value == void 0)
if (this.value === void 0)
throw new Error(msg || "Value is empty");
return this.value;
}
static of(val) {
return new _Optional(val);
}
setValue(newValue) {

@@ -52,3 +52,3 @@ this.value = newValue;

ifPresent(action) {
if (this.value == void 0)
if (this.value === void 0)
return;

@@ -55,0 +55,0 @@ try {

{
"name": "@rg-dev/stdlib",
"version": "1.0.11",
"version": "1.0.12",
"description": "",

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