typescript-optional
Advanced tools
Comparing version 1.5.0 to 1.6.1
@@ -16,3 +16,4 @@ export default abstract class Optional<T> { | ||
static ofNonNull<T>(payload: T): Optional<T>; | ||
static of<T>(payload: T): Optional<T>; | ||
static empty<T>(): Optional<T>; | ||
} |
@@ -30,2 +30,5 @@ "use strict"; | ||
Optional.ofNonNull = function (payload) { | ||
return Optional.of(payload); | ||
}; | ||
Optional.of = function (payload) { | ||
if (payload !== null && payload !== undefined) | ||
@@ -32,0 +35,0 @@ return new PresentOptional(payload); |
{ | ||
"name": "typescript-optional", | ||
"version": "1.5.0", | ||
"version": "1.6.1", | ||
"description": "Optional (like Java) implementation in TypeScript", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 2 instances in 1 package
193
0
15214