prelude.ts
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -1,2 +0,2 @@ | ||
interface Foldable<T> { | ||
export interface Foldable<T> { | ||
/** | ||
@@ -3,0 +3,0 @@ * Reduces the collection to a single value using the |
"use strict"; | ||
exports.__esModule = true; | ||
//# sourceMappingURL=Foldable.js.map |
@@ -6,2 +6,3 @@ import { WithEquality } from "./Comparison"; | ||
import { Vector } from "./Vector"; | ||
import { Foldable } from "./Foldable"; | ||
/** | ||
@@ -8,0 +9,0 @@ * A generic interface for a dictionary, mapping keys to values. |
import { WithEquality } from "./Comparison"; | ||
import { Value } from "./Value"; | ||
import { Collection } from "./Collection"; | ||
import { Foldable } from "./Foldable"; | ||
/** | ||
@@ -5,0 +6,0 @@ * A generic interface for set-like implementations. |
import { Value } from "./Value"; | ||
import { Seq } from "./Seq"; | ||
import { Vector } from "./Vector"; | ||
@@ -42,3 +41,3 @@ import { WithEquality } from "./Comparison"; | ||
*/ | ||
static sequence<T>(elts: Iterable<Option<T>>): Option<Seq<T>>; | ||
static sequence<T>(elts: Iterable<Option<T>>): Option<Vector<T>>; | ||
/** | ||
@@ -45,0 +44,0 @@ * Applicative lifting for Option. |
@@ -5,2 +5,3 @@ import { WithEquality, Ordering } from "./Comparison"; | ||
import { Collection } from "./Collection"; | ||
import { Foldable } from "./Foldable"; | ||
/** | ||
@@ -7,0 +8,0 @@ * A generic interface for list-like implementations. |
{ | ||
"name": "prelude.ts", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "A typescript functional programming library", | ||
@@ -5,0 +5,0 @@ "main": "dist/src/index.js", |
@@ -1,2 +0,2 @@ | ||
interface Foldable<T> { | ||
export interface Foldable<T> { | ||
@@ -3,0 +3,0 @@ /** |
@@ -6,2 +6,3 @@ import { WithEquality } from "./Comparison"; | ||
import { Vector } from "./Vector"; | ||
import { Foldable } from "./Foldable"; | ||
@@ -8,0 +9,0 @@ /** |
import { WithEquality } from "./Comparison"; | ||
import { Value} from "./Value"; | ||
import { Collection } from "./Collection"; | ||
import { Foldable } from "./Foldable"; | ||
@@ -5,0 +6,0 @@ /** |
@@ -59,4 +59,4 @@ import { Value } from "./Value"; | ||
*/ | ||
static sequence<T>(elts:Iterable<Option<T>>): Option<Seq<T>> { | ||
let r: Seq<T> = Vector.empty<T>(); | ||
static sequence<T>(elts:Iterable<Option<T>>): Option<Vector<T>> { | ||
let r: Vector<T> = Vector.empty<T>(); | ||
const iterator = elts[Symbol.iterator](); | ||
@@ -67,3 +67,3 @@ let curItem = iterator.next(); | ||
if (v.isNone()) { | ||
return <None<Seq<T>>>none; | ||
return <None<Vector<T>>>none; | ||
} | ||
@@ -70,0 +70,0 @@ r = r.appendStruct(v.getOrThrow()); |
@@ -5,2 +5,3 @@ import { WithEquality, Ordering } from "./Comparison"; | ||
import { Collection } from "./Collection"; | ||
import { Foldable } from "./Foldable"; | ||
@@ -7,0 +8,0 @@ /** |
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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 2 instances in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
1
0
524028
101
10609