@typed/maybe
Advanced tools
Comparing version 5.0.0 to 6.0.0
@@ -13,2 +13,1 @@ export * from './ap'; | ||
export * from './Nothing'; | ||
export * from './toMaybe'; |
@@ -13,3 +13,2 @@ export * from './ap'; | ||
export * from './Nothing'; | ||
export * from './toMaybe'; | ||
//# sourceMappingURL=index.js.map |
@@ -6,6 +6,7 @@ import { Just } from './Just'; | ||
/** | ||
* Creates a Maybe containg a value | ||
* Creates a Maybe containing a value. If the value is `undefined` or `null` | ||
* a `Nothing` will be returned. All other values will be wrapped in a `Just`. | ||
* @name Maybe.of<A>(value: A): Maybe<A> | ||
*/ | ||
const of: <A>(value: A) => Maybe<A>; | ||
const of: <A>(value: A | void) => Maybe<A>; | ||
} |
@@ -1,10 +0,11 @@ | ||
import { Just } from './Just'; | ||
import { toMaybe } from './toMaybe'; | ||
export var Maybe; | ||
(function (Maybe) { | ||
/** | ||
* Creates a Maybe containg a value | ||
* Creates a Maybe containing a value. If the value is `undefined` or `null` | ||
* a `Nothing` will be returned. All other values will be wrapped in a `Just`. | ||
* @name Maybe.of<A>(value: A): Maybe<A> | ||
*/ | ||
Maybe.of = Just.of; | ||
Maybe.of = toMaybe; | ||
})(Maybe || (Maybe = {})); | ||
//# sourceMappingURL=Maybe.js.map |
@@ -1,6 +0,6 @@ | ||
import { Maybe } from './Maybe'; | ||
import { Just } from './Just'; | ||
import { Nothing } from './Nothing'; | ||
export function toMaybe(value) { | ||
return value == null ? Nothing : Maybe.of(value); | ||
return value == null ? Nothing : Just.of(value); | ||
} | ||
//# sourceMappingURL=toMaybe.js.map |
@@ -13,2 +13,1 @@ export * from './ap'; | ||
export * from './Nothing'; | ||
export * from './toMaybe'; |
@@ -18,3 +18,2 @@ "use strict"; | ||
__export(require("./Nothing")); | ||
__export(require("./toMaybe")); | ||
//# sourceMappingURL=index.js.map |
@@ -6,6 +6,7 @@ import { Just } from './Just'; | ||
/** | ||
* Creates a Maybe containg a value | ||
* Creates a Maybe containing a value. If the value is `undefined` or `null` | ||
* a `Nothing` will be returned. All other values will be wrapped in a `Just`. | ||
* @name Maybe.of<A>(value: A): Maybe<A> | ||
*/ | ||
const of: <A>(value: A) => Maybe<A>; | ||
const of: <A>(value: A | void) => Maybe<A>; | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var Just_1 = require("./Just"); | ||
var toMaybe_1 = require("./toMaybe"); | ||
var Maybe; | ||
(function (Maybe) { | ||
/** | ||
* Creates a Maybe containg a value | ||
* Creates a Maybe containing a value. If the value is `undefined` or `null` | ||
* a `Nothing` will be returned. All other values will be wrapped in a `Just`. | ||
* @name Maybe.of<A>(value: A): Maybe<A> | ||
*/ | ||
Maybe.of = Just_1.Just.of; | ||
Maybe.of = toMaybe_1.toMaybe; | ||
})(Maybe = exports.Maybe || (exports.Maybe = {})); | ||
//# sourceMappingURL=Maybe.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var Maybe_1 = require("./Maybe"); | ||
var Just_1 = require("./Just"); | ||
var Nothing_1 = require("./Nothing"); | ||
function toMaybe(value) { | ||
return value == null ? Nothing_1.Nothing : Maybe_1.Maybe.of(value); | ||
return value == null ? Nothing_1.Nothing : Just_1.Just.of(value); | ||
} | ||
exports.toMaybe = toMaybe; | ||
//# sourceMappingURL=toMaybe.js.map |
{ | ||
"name": "@typed/maybe", | ||
"version": "5.0.0", | ||
"version": "6.0.0", | ||
"description": "Well-typed Maybe data structure", | ||
@@ -19,3 +19,3 @@ "main": "lib/index.js", | ||
"@typed/core": "2.1.0", | ||
"@typed/functions": "2.2.0" | ||
"@typed/functions": "2.3.0" | ||
}, | ||
@@ -22,0 +22,0 @@ "repository": { |
@@ -1,2 +0,2 @@ | ||
# @typed/maybe -- 4.1.0 | ||
# @typed/maybe -- 5.0.0 | ||
@@ -63,3 +63,4 @@ Well-typed Maybe data structure | ||
Creates a Maybe containg a value | ||
Creates a Maybe containing a value. If the value is `undefined` or `null` | ||
a `Nothing` will be returned. All other values will be wrapped in a `Just`. | ||
@@ -74,3 +75,3 @@ </p> | ||
export const of: <A>(value: A) => Maybe<A> = Just.of | ||
export const of: <A>(value: A) => Maybe<A> = toMaybe | ||
} | ||
@@ -77,0 +78,0 @@ |
@@ -13,2 +13,1 @@ export * from './ap' | ||
export * from './Nothing' | ||
export * from './toMaybe' |
import { Just } from './Just' | ||
import { Nothing } from './Nothing' | ||
import { toMaybe } from './toMaybe' | ||
@@ -8,6 +9,7 @@ export type Maybe<A> = Just<A> | Nothing | ||
/** | ||
* Creates a Maybe containg a value | ||
* Creates a Maybe containing a value. If the value is `undefined` or `null` | ||
* a `Nothing` will be returned. All other values will be wrapped in a `Just`. | ||
* @name Maybe.of<A>(value: A): Maybe<A> | ||
*/ | ||
export const of: <A>(value: A) => Maybe<A> = Just.of | ||
export const of: <A>(value: A | void) => Maybe<A> = toMaybe | ||
} |
@@ -0,1 +1,2 @@ | ||
import { Just } from './Just' | ||
import { Maybe } from './Maybe' | ||
@@ -5,3 +6,3 @@ import { Nothing } from './Nothing' | ||
export function toMaybe<A>(value: A | void): Maybe<A> { | ||
return value == null ? Nothing : Maybe.of<A>(value) | ||
return value == null ? Nothing : Just.of<A>(value) | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
59108
1053
461
+ Added@typed/functions@2.3.0(transitive)
- Removed@typed/functions@2.2.0(transitive)
Updated@typed/functions@2.3.0