@fp-ts/core
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.structural = void 0; | ||
exports.structural = exports.proto = void 0; | ||
/** | ||
@@ -13,3 +13,8 @@ * @since 1.0.0 | ||
const structural = /*#__PURE__*/Symbol.for("@effect/data/Equal/structural"); | ||
/** @internal */ | ||
exports.structural = structural; | ||
const proto = /*#__PURE__*/Object.setPrototypeOf({ | ||
[structural]: true | ||
}, Object.prototype); | ||
exports.proto = proto; | ||
//# sourceMappingURL=effect.js.map |
@@ -25,18 +25,12 @@ "use strict"; | ||
exports.isRight = isRight; | ||
const left = e => Object.defineProperty({ | ||
const left = e => Object.setPrototypeOf({ | ||
_tag: "Left", | ||
left: e | ||
}, _effect.structural, { | ||
enumerable: false, | ||
value: true | ||
}); | ||
}, _effect.proto); | ||
/** @internal */ | ||
exports.left = left; | ||
const right = a => Object.defineProperty({ | ||
const right = a => Object.setPrototypeOf({ | ||
_tag: "Right", | ||
right: a | ||
}, _effect.structural, { | ||
enumerable: false, | ||
value: true | ||
}); | ||
}, _effect.proto); | ||
/** @internal */ | ||
@@ -43,0 +37,0 @@ exports.right = right; |
@@ -22,17 +22,11 @@ "use strict"; | ||
exports.isSome = isSome; | ||
const none = /*#__PURE__*/Object.defineProperty({ | ||
const none = /*#__PURE__*/Object.setPrototypeOf({ | ||
_tag: "None" | ||
}, _effect.structural, { | ||
enumerable: false, | ||
value: true | ||
}); | ||
}, _effect.proto); | ||
/** @internal */ | ||
exports.none = none; | ||
const some = a => Object.defineProperty({ | ||
const some = a => Object.setPrototypeOf({ | ||
_tag: "Some", | ||
value: a | ||
}, _effect.structural, { | ||
enumerable: false, | ||
value: true | ||
}); | ||
}, _effect.proto); | ||
/** @internal */ | ||
@@ -39,0 +33,0 @@ exports.some = some; |
{ | ||
"name": "@fp-ts/core", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -7,1 +7,4 @@ /** | ||
export const structural = Symbol.for("@effect/data/Equal/structural") | ||
/** @internal */ | ||
export const proto = Object.setPrototypeOf({ [structural]: true }, Object.prototype) |
@@ -7,3 +7,3 @@ /** | ||
import type { LazyArg } from "@fp-ts/core/Function" | ||
import { structural } from "@fp-ts/core/internal/effect" | ||
import { proto, structural } from "@fp-ts/core/internal/effect" | ||
import * as option from "@fp-ts/core/internal/Option" | ||
@@ -25,7 +25,7 @@ import type { Option } from "@fp-ts/core/Option" | ||
export const left = <E>(e: E): Either<E, never> => | ||
Object.defineProperty({ _tag: "Left", left: e }, structural, { enumerable: false, value: true }) | ||
Object.setPrototypeOf({ _tag: "Left", left: e }, proto) | ||
/** @internal */ | ||
export const right = <A>(a: A): Either<never, A> => | ||
Object.defineProperty({ _tag: "Right", right: a }, structural, { enumerable: false, value: true }) | ||
Object.setPrototypeOf({ _tag: "Right", right: a }, proto) | ||
@@ -32,0 +32,0 @@ /** @internal */ |
@@ -5,3 +5,3 @@ /** | ||
import { structural } from "@fp-ts/core/internal/effect" | ||
import { proto, structural } from "@fp-ts/core/internal/effect" | ||
import type { None, Option, Some } from "@fp-ts/core/Option" | ||
@@ -21,10 +21,6 @@ | ||
/** @internal */ | ||
export const none: Option<never> = Object.defineProperty({ _tag: "None" }, structural, { | ||
enumerable: false, | ||
value: true | ||
}) | ||
export const none: Option<never> = Object.setPrototypeOf({ _tag: "None" }, proto) | ||
/** @internal */ | ||
export const some = <A>(a: A): Option<A> => | ||
Object.defineProperty({ _tag: "Some", value: a }, structural, { enumerable: false, value: true }) | ||
export const some = <A>(a: A): Option<A> => Object.setPrototypeOf({ _tag: "Some", value: a }, proto) | ||
@@ -31,0 +27,0 @@ /** @internal */ |
@@ -22,3 +22,3 @@ /** | ||
import type { Kind, TypeLambda } from "@fp-ts/core/HKT" | ||
import { structural } from "@fp-ts/core/internal/effect" | ||
import { proto, structural } from "@fp-ts/core/internal/effect" | ||
import * as either from "@fp-ts/core/internal/Either" | ||
@@ -113,6 +113,3 @@ import * as option from "@fp-ts/core/internal/Option" | ||
export const both = <E, A>(left: E, right: A): These<E, A> => | ||
Object.defineProperty({ _tag: "Both", left, right }, structural, { | ||
enumerable: false, | ||
value: true | ||
}) | ||
Object.setPrototypeOf({ _tag: "Both", left, right }, proto) | ||
@@ -119,0 +116,0 @@ /** |
@@ -51,10 +51,7 @@ "use strict"; | ||
exports.of = of; | ||
const both = (left, right) => Object.defineProperty({ | ||
const both = (left, right) => Object.setPrototypeOf({ | ||
_tag: "Both", | ||
left, | ||
right | ||
}, _effect.structural, { | ||
enumerable: false, | ||
value: true | ||
}); | ||
}, _effect.proto); | ||
/** | ||
@@ -61,0 +58,0 @@ * @category constructors |
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
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
1389626
32219