New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@abadi199/maybe

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@abadi199/maybe - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "@abadi199/maybe",
"version": "1.0.0",
"version": "1.0.1",
"description": "A DataType Representing the concept of null in more safer way.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

export enum MaybeKind {
Nothing = 1,
Just = 2,
Just = 2
}

@@ -10,4 +10,4 @@

isJust(): boolean;
map<b>(f: (payload: data) => b) : Maybe<b>;
andThen<b>(f: (payload: data) => Maybe<b>) : Maybe<b>;
map<b>(f: (payload: data) => b): Maybe<b>;
andThen<b>(f: (payload: data) => Maybe<b>): Maybe<b>;
withDefault(payload: data): data;

@@ -21,3 +21,3 @@ }

}
isJust() {
isJust() {
return !this.isNothing();

@@ -28,3 +28,3 @@ }

}
andThen<b>(_f: (payload: data) => Maybe<b>) : Maybe<b> {
andThen<b>(_f: (payload: data) => Maybe<b>): Maybe<b> {
return new Nothing<b>();

@@ -63,7 +63,5 @@ }

export function just<data>(value: data): Maybe<data> {
return new Just(value);
return value ? new Just(value) : nothing();
}
export type Maybe<data> =
| Nothing<data>
| Just<data>
export type Maybe<data> = Nothing<data> | Just<data>;
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