space-lift
Advanced tools
Comparing version 0.4.1 to 0.4.2
@@ -1,3 +0,3 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ append: typeof append; |
"use strict"; | ||
exports.__esModule = true; | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -8,5 +8,5 @@ * Appends one item at the end of the Array. | ||
function append(item) { | ||
return new wrapper_1.ArrayOps(this.value().concat(item)); | ||
return new lift_1.ArrayOps(this.value().concat(item)); | ||
} | ||
exports.append = append; | ||
wrapper_1.ArrayOps.prototype.append = append; | ||
lift_1.ArrayOps.prototype.append = append; |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ appendAll: typeof appendAll; |
"use strict"; | ||
exports.__esModule = true; | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -8,5 +8,5 @@ * Appends an Array of items at the end of the Array. | ||
function appendAll(items) { | ||
return new wrapper_1.ArrayOps(this.value().concat(items)); | ||
return new lift_1.ArrayOps(this.value().concat(items)); | ||
} | ||
exports.appendAll = appendAll; | ||
wrapper_1.ArrayOps.prototype.appendAll = appendAll; | ||
lift_1.ArrayOps.prototype.appendAll = appendAll; |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ compact: typeof compact; |
"use strict"; | ||
exports.__esModule = true; | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -12,2 +12,2 @@ * Filters all the falsy elements out of this Array. | ||
exports.compact = compact; | ||
wrapper_1.ArrayOps.prototype.compact = compact; | ||
lift_1.ArrayOps.prototype.compact = compact; |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps, NumberOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps, NumberOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ count: typeof count; |
"use strict"; | ||
exports.__esModule = true; | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -13,5 +13,5 @@ * Counts the items satisfying a predicate. | ||
} | ||
return new wrapper_1.NumberOps(result); | ||
return new lift_1.NumberOps(result); | ||
} | ||
exports.count = count; | ||
wrapper_1.ArrayOps.prototype.count = count; | ||
lift_1.ArrayOps.prototype.count = count; |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ distinct: typeof distinct; |
"use strict"; | ||
exports.__esModule = true; | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -33,5 +33,5 @@ * Creates an array without any duplicate item. | ||
} | ||
return new wrapper_1.ArrayOps(result); | ||
return new lift_1.ArrayOps(result); | ||
} | ||
exports.distinct = distinct; | ||
wrapper_1.ArrayOps.prototype.distinct = distinct; | ||
lift_1.ArrayOps.prototype.distinct = distinct; |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ drop: typeof drop; |
"use strict"; | ||
exports.__esModule = true; | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -8,5 +8,5 @@ * Drops the first 'count' items from this Array. | ||
function drop(count) { | ||
return new wrapper_1.ArrayOps(this.value().slice(count)); | ||
return new lift_1.ArrayOps(this.value().slice(count)); | ||
} | ||
exports.drop = drop; | ||
wrapper_1.ArrayOps.prototype.drop = drop; | ||
lift_1.ArrayOps.prototype.drop = drop; |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ dropRight: typeof dropRight; |
"use strict"; | ||
exports.__esModule = true; | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -8,5 +8,5 @@ * Drops the last 'count' items from this Array. | ||
function dropRight(count) { | ||
return new wrapper_1.ArrayOps(this.value().slice(0, -count)); | ||
return new lift_1.ArrayOps(this.value().slice(0, -count)); | ||
} | ||
exports.dropRight = dropRight; | ||
wrapper_1.ArrayOps.prototype.dropRight = dropRight; | ||
lift_1.ArrayOps.prototype.dropRight = dropRight; |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps, BoolOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps, BoolOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ every: typeof every; |
"use strict"; | ||
exports.__esModule = true; | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -11,7 +11,7 @@ * Returns whether all items satisfies the predicate. | ||
if (!predicate(arr[i], i)) | ||
return new wrapper_1.BoolOps(false); | ||
return new lift_1.BoolOps(false); | ||
} | ||
return new wrapper_1.BoolOps(true); | ||
return new lift_1.BoolOps(true); | ||
} | ||
exports.every = every; | ||
wrapper_1.ArrayOps.prototype.every = every; | ||
lift_1.ArrayOps.prototype.every = every; |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ filter: typeof filter; |
"use strict"; | ||
exports.__esModule = true; | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -14,5 +14,5 @@ * Filters this array by aplying a predicate to all items. | ||
} | ||
return new wrapper_1.ArrayOps(result); | ||
return new lift_1.ArrayOps(result); | ||
} | ||
exports.filter = filter; | ||
wrapper_1.ArrayOps.prototype.filter = filter; | ||
lift_1.ArrayOps.prototype.filter = filter; |
import { Option } from '../option'; | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -5,0 +5,0 @@ find: typeof find; |
"use strict"; | ||
exports.__esModule = true; | ||
var option_1 = require("../option"); | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -18,2 +18,2 @@ * Finds the first item in this Array satisfying a predicate. | ||
exports.find = find; | ||
wrapper_1.ArrayOps.prototype.find = find; | ||
lift_1.ArrayOps.prototype.find = find; |
import { Option } from '../option'; | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -5,0 +5,0 @@ findIndex: typeof findIndex; |
"use strict"; | ||
exports.__esModule = true; | ||
var option_1 = require("../option"); | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -17,2 +17,2 @@ * Finds the first item index in this Array satisfying a predicate. | ||
exports.findIndex = findIndex; | ||
wrapper_1.ArrayOps.prototype.findIndex = findIndex; | ||
lift_1.ArrayOps.prototype.findIndex = findIndex; |
import { Option } from '../option'; | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -5,0 +5,0 @@ first: typeof first; |
"use strict"; | ||
exports.__esModule = true; | ||
var option_1 = require("../option"); | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -12,2 +12,2 @@ * Returns the first item of this Array, as an Option. | ||
exports.first = first; | ||
wrapper_1.ArrayOps.prototype.first = first; | ||
lift_1.ArrayOps.prototype.first = first; |
import { Option } from '../option'; | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -5,0 +5,0 @@ flatMap: typeof flatMap; |
"use strict"; | ||
exports.__esModule = true; | ||
var option_1 = require("../option"); | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -15,7 +15,7 @@ * Maps this Array to an Array of Array | Option | ArrayOps using a mapper function then flattens it. | ||
else | ||
result.push.apply(result, wrapper_1.getValue(item)); | ||
result.push.apply(result, lift_1.getValue(item)); | ||
} | ||
return new wrapper_1.ArrayOps(result); | ||
return new lift_1.ArrayOps(result); | ||
} | ||
exports.flatMap = flatMap; | ||
wrapper_1.ArrayOps.prototype.flatMap = flatMap; | ||
lift_1.ArrayOps.prototype.flatMap = flatMap; |
import { Option } from '../option'; | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -5,0 +5,0 @@ flatten: typeof flatten; |
"use strict"; | ||
exports.__esModule = true; | ||
var option_1 = require("../option"); | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -17,5 +17,5 @@ * Flattens this Array of Arrays/Options. | ||
} | ||
return new wrapper_1.ArrayOps(result); | ||
return new lift_1.ArrayOps(result); | ||
} | ||
exports.flatten = flatten; | ||
wrapper_1.ArrayOps.prototype.flatten = flatten; | ||
lift_1.ArrayOps.prototype.flatten = flatten; |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps, ObjectOps, NumberOps, StringOps, BoolOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps, ObjectOps, NumberOps, StringOps, BoolOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ fold: typeof fold; |
"use strict"; | ||
exports.__esModule = true; | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -12,5 +12,5 @@ * Folds this Array into a single value, using a starting value. | ||
} | ||
return wrapper_1["default"](result); | ||
return lift_1["default"](result); | ||
} | ||
exports.fold = fold; | ||
wrapper_1.ArrayOps.prototype.fold = fold; | ||
lift_1.ArrayOps.prototype.fold = fold; |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps, ObjectOps, NumberOps, StringOps, BoolOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps, ObjectOps, NumberOps, StringOps, BoolOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ foldRight: typeof foldRight; |
"use strict"; | ||
exports.__esModule = true; | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -12,5 +12,5 @@ * Folds this Array into a single value, using a starting value, from the right. | ||
} | ||
return wrapper_1["default"](result); | ||
return lift_1["default"](result); | ||
} | ||
exports.foldRight = foldRight; | ||
wrapper_1.ArrayOps.prototype.foldRight = foldRight; | ||
lift_1.ArrayOps.prototype.foldRight = foldRight; |
@@ -1,2 +0,2 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
import { ArrayOps } from '../lift'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Converts an Array-like object (such as an arguments or NodeList instance) to a regular Array |
"use strict"; | ||
exports.__esModule = true; | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -8,4 +8,4 @@ * Converts an Array-like object (such as an arguments or NodeList instance) to a regular Array | ||
function fromArrayLike(arrayLike) { | ||
return new wrapper_1.ArrayOps([].slice.call(arrayLike)); | ||
return new lift_1.ArrayOps([].slice.call(arrayLike)); | ||
} | ||
exports.fromArrayLike = fromArrayLike; |
import { Option } from '../option'; | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -5,0 +5,0 @@ get: typeof get; |
"use strict"; | ||
exports.__esModule = true; | ||
var option_1 = require("../option"); | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -12,2 +12,2 @@ * Returns the item found at the provided index, as an Option. | ||
exports.get = get; | ||
wrapper_1.ArrayOps.prototype.get = get; | ||
lift_1.ArrayOps.prototype.get = get; |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps, ObjectOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps, ObjectOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ groupBy: typeof groupBy; |
"use strict"; | ||
exports.__esModule = true; | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -17,5 +17,5 @@ * Creates an object composed of keys generated from the results of running each element through a discriminator function. | ||
} | ||
return new wrapper_1.ObjectOps(groups); | ||
return new lift_1.ObjectOps(groups); | ||
} | ||
exports.groupBy = groupBy; | ||
wrapper_1.ArrayOps.prototype.groupBy = groupBy; | ||
lift_1.ArrayOps.prototype.groupBy = groupBy; |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ insert: typeof insert; |
"use strict"; | ||
exports.__esModule = true; | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -10,5 +10,5 @@ * Insert an item at a specified index. | ||
result.splice(index, 0, item); | ||
return new wrapper_1.ArrayOps(result); | ||
return new lift_1.ArrayOps(result); | ||
} | ||
exports.insert = insert; | ||
wrapper_1.ArrayOps.prototype.insert = insert; | ||
lift_1.ArrayOps.prototype.insert = insert; |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ insertAll: typeof insertAll; |
"use strict"; | ||
exports.__esModule = true; | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -10,5 +10,5 @@ * Insert an Array of items at a specified index. | ||
result.splice.apply(result, [index, 0].concat(items)); | ||
return new wrapper_1.ArrayOps(result); | ||
return new lift_1.ArrayOps(result); | ||
} | ||
exports.insertAll = insertAll; | ||
wrapper_1.ArrayOps.prototype.insertAll = insertAll; | ||
lift_1.ArrayOps.prototype.insertAll = insertAll; |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps, StringOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps, StringOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ join: typeof join; |
"use strict"; | ||
exports.__esModule = true; | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -9,5 +9,5 @@ * Joins the items into a string, using a separator. | ||
if (separator === void 0) { separator = ','; } | ||
return new wrapper_1.StringOps(this.value().join(separator)); | ||
return new lift_1.StringOps(this.value().join(separator)); | ||
} | ||
exports.join = join; | ||
wrapper_1.ArrayOps.prototype.join = join; | ||
lift_1.ArrayOps.prototype.join = join; |
import { Option } from '../option'; | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -5,0 +5,0 @@ last: typeof last; |
"use strict"; | ||
exports.__esModule = true; | ||
var option_1 = require("../option"); | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -13,2 +13,2 @@ * Returns the last item of this Array, as an Option. | ||
exports.last = last; | ||
wrapper_1.ArrayOps.prototype.last = last; | ||
lift_1.ArrayOps.prototype.last = last; |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps, Wrapper } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps, Wrapper } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ map: typeof map; |
"use strict"; | ||
exports.__esModule = true; | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -10,7 +10,7 @@ * Maps this Array using a mapper function. | ||
for (var i = 0; i < arr.length; i++) { | ||
result[i] = wrapper_1.getValue(fun(arr[i], i)); | ||
result[i] = lift_1.getValue(fun(arr[i], i)); | ||
} | ||
return new wrapper_1.ArrayOps(result); | ||
return new lift_1.ArrayOps(result); | ||
} | ||
exports.map = map; | ||
wrapper_1.ArrayOps.prototype.map = map; | ||
lift_1.ArrayOps.prototype.map = map; |
@@ -1,2 +0,2 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
import { ArrayOps } from '../lift'; | ||
export declare function range(start: number, stop?: number, step?: number): ArrayOps<number>; |
"use strict"; | ||
exports.__esModule = true; | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/* | ||
@@ -21,4 +21,4 @@ * Returns a number[] wrapper with all numbers from start to stop (inclusive), | ||
} | ||
return new wrapper_1.ArrayOps(result); | ||
return new lift_1.ArrayOps(result); | ||
} | ||
exports.range = range; |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ removeAt: typeof removeAt; |
"use strict"; | ||
exports.__esModule = true; | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -10,5 +10,5 @@ * Removes the item found at the specified index. | ||
result.splice(index, 1); | ||
return new wrapper_1.ArrayOps(result); | ||
return new lift_1.ArrayOps(result); | ||
} | ||
exports.removeAt = removeAt; | ||
wrapper_1.ArrayOps.prototype.removeAt = removeAt; | ||
lift_1.ArrayOps.prototype.removeAt = removeAt; |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ reverse: typeof reverse; |
"use strict"; | ||
exports.__esModule = true; | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -8,5 +8,5 @@ * Reverses the Array. | ||
function reverse() { | ||
return new wrapper_1.ArrayOps(this.value().slice().reverse()); | ||
return new lift_1.ArrayOps(this.value().slice().reverse()); | ||
} | ||
exports.reverse = reverse; | ||
wrapper_1.ArrayOps.prototype.reverse = reverse; | ||
lift_1.ArrayOps.prototype.reverse = reverse; |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps, BoolOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps, BoolOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ some: typeof some; |
"use strict"; | ||
exports.__esModule = true; | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -11,7 +11,7 @@ * Returns whether at least one item satisfies the predicate. | ||
if (predicate(arr[i], i)) | ||
return new wrapper_1.BoolOps(true); | ||
return new lift_1.BoolOps(true); | ||
} | ||
return new wrapper_1.BoolOps(false); | ||
return new lift_1.BoolOps(false); | ||
} | ||
exports.some = some; | ||
wrapper_1.ArrayOps.prototype.some = some; | ||
lift_1.ArrayOps.prototype.some = some; |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ sort: typeof sort; |
"use strict"; | ||
exports.__esModule = true; | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -66,5 +66,5 @@ * Sorts the Array. The sort is stable. | ||
result.reverse(); | ||
return new wrapper_1.ArrayOps(result); | ||
return new lift_1.ArrayOps(result); | ||
} | ||
exports.sort = sort; | ||
wrapper_1.ArrayOps.prototype.sort = sort; | ||
lift_1.ArrayOps.prototype.sort = sort; |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ take: typeof take; |
"use strict"; | ||
exports.__esModule = true; | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -8,5 +8,5 @@ * Takes the first 'count' items from this Array. | ||
function take(count) { | ||
return new wrapper_1.ArrayOps(this.value().slice(0, count)); | ||
return new lift_1.ArrayOps(this.value().slice(0, count)); | ||
} | ||
exports.take = take; | ||
wrapper_1.ArrayOps.prototype.take = take; | ||
lift_1.ArrayOps.prototype.take = take; |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ takeRight: typeof takeRight; |
"use strict"; | ||
exports.__esModule = true; | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -9,3 +9,3 @@ * Takes the last 'count' items from this Array. | ||
var arr = this.value(); | ||
return new wrapper_1.ArrayOps((arr.length < count) | ||
return new lift_1.ArrayOps((arr.length < count) | ||
? arr.slice(0) | ||
@@ -15,2 +15,2 @@ : arr.slice(arr.length - count)); | ||
exports.takeRight = takeRight; | ||
wrapper_1.ArrayOps.prototype.takeRight = takeRight; | ||
lift_1.ArrayOps.prototype.takeRight = takeRight; |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps, ObjectOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps, ObjectOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ toSet: typeof toSet; |
"use strict"; | ||
exports.__esModule = true; | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -12,5 +12,5 @@ * Converts this Array of numbers or strings to a Set-like object where values are all truthy. | ||
} | ||
return new wrapper_1.ObjectOps(result); | ||
return new lift_1.ObjectOps(result); | ||
} | ||
exports.toSet = toSet; | ||
wrapper_1.ArrayOps.prototype.toSet = toSet; | ||
lift_1.ArrayOps.prototype.toSet = toSet; |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps, Wrapper } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps, Wrapper } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ updateAt: typeof updateAt; |
"use strict"; | ||
exports.__esModule = true; | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -10,6 +10,6 @@ * Updates an item at the specified index. | ||
if (result.length > index) | ||
result[index] = wrapper_1.getValue(updater(result[index])); | ||
return new wrapper_1.ArrayOps(result); | ||
result[index] = lift_1.getValue(updater(result[index])); | ||
return new lift_1.ArrayOps(result); | ||
} | ||
exports.updateAt = updateAt; | ||
wrapper_1.ArrayOps.prototype.updateAt = updateAt; | ||
lift_1.ArrayOps.prototype.updateAt = updateAt; |
@@ -1,4 +0,4 @@ | ||
import lift from './wrapper'; | ||
import lift from './lift'; | ||
export default lift; | ||
export { ArrayOps, ObjectOps, BoolOps, NumberOps, StringOps, Wrapper, getValue } from './wrapper'; | ||
export { ArrayOps, ObjectOps, BoolOps, NumberOps, StringOps, Wrapper, getValue } from './lift'; | ||
export { update, deepUpdate, DELETE } from 'immupdate'; | ||
@@ -5,0 +5,0 @@ export { Option, None, Some } from './option'; |
"use strict"; | ||
exports.__esModule = true; | ||
var wrapper_1 = require("./wrapper"); | ||
exports["default"] = wrapper_1["default"]; | ||
var wrapper_2 = require("./wrapper"); | ||
exports.ArrayOps = wrapper_2.ArrayOps; | ||
exports.ObjectOps = wrapper_2.ObjectOps; | ||
exports.BoolOps = wrapper_2.BoolOps; | ||
exports.NumberOps = wrapper_2.NumberOps; | ||
exports.StringOps = wrapper_2.StringOps; | ||
exports.getValue = wrapper_2.getValue; | ||
var lift_1 = require("./lift"); | ||
exports["default"] = lift_1["default"]; | ||
var lift_2 = require("./lift"); | ||
exports.ArrayOps = lift_2.ArrayOps; | ||
exports.ObjectOps = lift_2.ObjectOps; | ||
exports.BoolOps = lift_2.BoolOps; | ||
exports.NumberOps = lift_2.NumberOps; | ||
exports.StringOps = lift_2.StringOps; | ||
exports.getValue = lift_2.getValue; | ||
var immupdate_1 = require("immupdate"); | ||
@@ -13,0 +13,0 @@ exports.update = immupdate_1.update; |
@@ -1,3 +0,3 @@ | ||
import { ObjectOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ObjectOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ObjectOps<A> { | ||
@@ -4,0 +4,0 @@ add: typeof add; |
"use strict"; | ||
exports.__esModule = true; | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -12,5 +12,5 @@ * Adds a key/value to this "Map" object. | ||
result[key] = value; | ||
return new wrapper_1.ObjectOps(result); | ||
return new lift_1.ObjectOps(result); | ||
} | ||
exports.add = add; | ||
wrapper_1.ObjectOps.prototype.add = add; | ||
lift_1.ObjectOps.prototype.add = add; |
@@ -1,3 +0,3 @@ | ||
import { ObjectOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ObjectOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ObjectOps<A> { | ||
@@ -4,0 +4,0 @@ filter: typeof filter; |
"use strict"; | ||
exports.__esModule = true; | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -14,5 +14,5 @@ * Filter keys/values of a "Map" object | ||
}); | ||
return new wrapper_1.ObjectOps(result); | ||
return new lift_1.ObjectOps(result); | ||
} | ||
exports.filter = filter; | ||
wrapper_1.ObjectOps.prototype.filter = filter; | ||
lift_1.ObjectOps.prototype.filter = filter; |
import { Option } from '../option'; | ||
import { ObjectOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ObjectOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ObjectOps<A> { | ||
@@ -5,0 +5,0 @@ get: typeof get; |
"use strict"; | ||
exports.__esModule = true; | ||
var option_1 = require("../option"); | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -14,2 +14,2 @@ * Returns the value found at the provided key, as an Option. | ||
exports.get = get; | ||
wrapper_1.ObjectOps.prototype.get = get; | ||
lift_1.ObjectOps.prototype.get = get; |
@@ -1,3 +0,3 @@ | ||
import { ObjectOps, ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ObjectOps, ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ObjectOps<A> { | ||
@@ -4,0 +4,0 @@ keys: typeof keys; |
"use strict"; | ||
exports.__esModule = true; | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -8,5 +8,5 @@ * Creates an Array of all this object's keys, in no particular order. | ||
function keys() { | ||
return new wrapper_1.ArrayOps(Object.keys(this.value())); | ||
return new lift_1.ArrayOps(Object.keys(this.value())); | ||
} | ||
exports.keys = keys; | ||
wrapper_1.ObjectOps.prototype.keys = keys; | ||
lift_1.ObjectOps.prototype.keys = keys; |
@@ -1,3 +0,3 @@ | ||
import { ObjectOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ObjectOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ObjectOps<A> { | ||
@@ -4,0 +4,0 @@ mapValues: typeof mapValues; |
"use strict"; | ||
exports.__esModule = true; | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -13,5 +13,5 @@ * Maps all the values of this object. | ||
}); | ||
return new wrapper_1.ObjectOps(result); | ||
return new lift_1.ObjectOps(result); | ||
} | ||
exports.mapValues = mapValues; | ||
wrapper_1.ObjectOps.prototype.mapValues = mapValues; | ||
lift_1.ObjectOps.prototype.mapValues = mapValues; |
@@ -1,3 +0,3 @@ | ||
import { ObjectOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ObjectOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ObjectOps<A> { | ||
@@ -4,0 +4,0 @@ remove: typeof remove; |
"use strict"; | ||
exports.__esModule = true; | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -16,5 +16,5 @@ * Returns an Object where the given keys are removed. | ||
result[key] = obj[key]; }); | ||
return new wrapper_1.ObjectOps(result); | ||
return new lift_1.ObjectOps(result); | ||
} | ||
exports.remove = remove; | ||
wrapper_1.ObjectOps.prototype.remove = remove; | ||
lift_1.ObjectOps.prototype.remove = remove; |
@@ -1,2 +0,2 @@ | ||
import { ObjectOps } from '../wrapper'; | ||
import { ObjectOps } from '../lift'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Creates a Set-like object (string keys, true values) from a list of keys |
"use strict"; | ||
exports.__esModule = true; | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -14,4 +14,4 @@ * Creates a Set-like object (string keys, true values) from a list of keys | ||
keys.forEach(function (key) { return result[key] = true; }); | ||
return new wrapper_1.ObjectOps(result); | ||
return new lift_1.ObjectOps(result); | ||
} | ||
exports.Set = Set; |
@@ -1,3 +0,3 @@ | ||
import { ObjectOps, ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ObjectOps, ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ObjectOps<A> { | ||
@@ -4,0 +4,0 @@ toArray: typeof toArray; |
"use strict"; | ||
exports.__esModule = true; | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -12,5 +12,5 @@ * Converts this object to an Array of tuples. | ||
}); | ||
return new wrapper_1.ArrayOps(result); | ||
return new lift_1.ArrayOps(result); | ||
} | ||
exports.toArray = toArray; | ||
wrapper_1.ObjectOps.prototype.toArray = toArray; | ||
lift_1.ObjectOps.prototype.toArray = toArray; |
@@ -1,3 +0,3 @@ | ||
import { ObjectOps, ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ObjectOps, ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ObjectOps<A> { | ||
@@ -4,0 +4,0 @@ values: typeof values; |
"use strict"; | ||
exports.__esModule = true; | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
/** | ||
@@ -12,5 +12,5 @@ * Creates an Array of all this object's values. | ||
}); | ||
return new wrapper_1.ArrayOps(result); | ||
return new lift_1.ArrayOps(result); | ||
} | ||
exports.values = values; | ||
wrapper_1.ObjectOps.prototype.values = values; | ||
lift_1.ObjectOps.prototype.values = values; |
@@ -1,2 +0,2 @@ | ||
import { Wrapper, ArrayOps } from '../wrapper'; | ||
import { Wrapper, ArrayOps } from '../lift'; | ||
export interface Option<A> { | ||
@@ -3,0 +3,0 @@ /** |
"use strict"; | ||
exports.__esModule = true; | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
// The Option factory / static object | ||
@@ -40,3 +40,3 @@ var OptionObject = function (value) { | ||
self.getOrElse = function (alt) { return alt; }; | ||
self.toArray = function () { return wrapper_1["default"]([]); }; | ||
self.toArray = function () { return lift_1["default"]([]); }; | ||
self.toString = function () { return 'None'; }; | ||
@@ -61,3 +61,3 @@ self.toJSON = function () { return null; }; | ||
map: function (fn) { | ||
return exports.Option(wrapper_1.getValue(fn(this.value))); | ||
return exports.Option(lift_1.getValue(fn(this.value))); | ||
}, | ||
@@ -80,3 +80,3 @@ flatMap: function (fn) { | ||
toArray: function () { | ||
return wrapper_1["default"]([this.value]); | ||
return lift_1["default"]([this.value]); | ||
}, | ||
@@ -83,0 +83,0 @@ toString: function () { |
@@ -1,2 +0,2 @@ | ||
import { Wrapper } from '../wrapper'; | ||
import { Wrapper } from '../lift'; | ||
export interface ResultOps<E, A> { | ||
@@ -3,0 +3,0 @@ /** |
"use strict"; | ||
exports.__esModule = true; | ||
var wrapper_1 = require("../wrapper"); | ||
var lift_1 = require("../lift"); | ||
var ResultObject = {}; | ||
@@ -32,3 +32,3 @@ ResultObject.all = function () { | ||
map: function (fn) { | ||
return Ok(wrapper_1.getValue(fn(this._value))); | ||
return Ok(lift_1.getValue(fn(this._value))); | ||
}, | ||
@@ -35,0 +35,0 @@ mapError: function (fn) { |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps, ObjectOps, NumberOps, StringOps, BoolOps, Wrapper } from './wrapper'; | ||
declare module './wrapper' { | ||
import { ArrayOps, ObjectOps, NumberOps, StringOps, BoolOps, Wrapper } from './lift'; | ||
declare module '../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -7,3 +7,3 @@ transform: typeof transform; | ||
} | ||
declare module './wrapper' { | ||
declare module '../wrapper' { | ||
interface ObjectOps<A> { | ||
@@ -13,3 +13,3 @@ transform: typeof transform; | ||
} | ||
declare module './wrapper' { | ||
declare module '../wrapper' { | ||
interface NumberOps { | ||
@@ -19,3 +19,3 @@ transform: typeof transform; | ||
} | ||
declare module './wrapper' { | ||
declare module '../wrapper' { | ||
interface StringOps { | ||
@@ -25,3 +25,3 @@ transform: typeof transform; | ||
} | ||
declare module './wrapper' { | ||
declare module '../wrapper' { | ||
interface BoolOps { | ||
@@ -28,0 +28,0 @@ transform: typeof transform; |
"use strict"; | ||
exports.__esModule = true; | ||
var wrapper_1 = require("./wrapper"); | ||
var lift_1 = require("./lift"); | ||
/** | ||
@@ -8,9 +8,9 @@ * Runs an arbitrary transformation. | ||
function transform(func) { | ||
return wrapper_1["default"](func(this.value())); | ||
return lift_1["default"](func(this.value())); | ||
} | ||
exports.transform = transform; | ||
wrapper_1.NumberOps.prototype.transform = transform; | ||
wrapper_1.StringOps.prototype.transform = transform; | ||
wrapper_1.BoolOps.prototype.transform = transform; | ||
wrapper_1.ArrayOps.prototype.transform = transform; | ||
wrapper_1.ObjectOps.prototype.transform = transform; | ||
lift_1.NumberOps.prototype.transform = transform; | ||
lift_1.StringOps.prototype.transform = transform; | ||
lift_1.BoolOps.prototype.transform = transform; | ||
lift_1.ArrayOps.prototype.transform = transform; | ||
lift_1.ObjectOps.prototype.transform = transform; |
@@ -0,1 +1,3 @@ | ||
import { Wrapper } from '../lift'; | ||
export { Wrapper } from '../lift'; | ||
export interface Lift { | ||
@@ -15,6 +17,2 @@ /** Wraps a Number to provide a richer API. Unwrap with .value() **/ | ||
export default lift; | ||
export interface Wrapper<A> { | ||
_isLiftWrapper: {}; | ||
value(): A; | ||
} | ||
export declare function getValue<A>(input: A | Wrapper<A>): A; | ||
@@ -21,0 +19,0 @@ export declare class ArrayOps<A> implements Wrapper<A[]> { |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ append: typeof append; |
@@ -1,2 +0,2 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
import { ArrayOps } from '../lift'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Appends one item at the end of the Array. |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ appendAll: typeof appendAll; |
@@ -1,2 +0,2 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
import { ArrayOps } from '../lift'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Appends an Array of items at the end of the Array. |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ compact: typeof compact; |
@@ -1,2 +0,2 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
import { ArrayOps } from '../lift'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Filters all the falsy elements out of this Array. |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps, NumberOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps, NumberOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ count: typeof count; |
@@ -1,2 +0,2 @@ | ||
import { ArrayOps, NumberOps } from '../wrapper'; | ||
import { ArrayOps, NumberOps } from '../lift'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Counts the items satisfying a predicate. |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ distinct: typeof distinct; |
@@ -1,2 +0,2 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
import { ArrayOps } from '../lift'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Creates an array without any duplicate item. |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ drop: typeof drop; |
@@ -1,2 +0,2 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
import { ArrayOps } from '../lift'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Drops the first 'count' items from this Array. |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ dropRight: typeof dropRight; |
@@ -1,2 +0,2 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
import { ArrayOps } from '../lift'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Drops the last 'count' items from this Array. |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps, BoolOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps, BoolOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ every: typeof every; |
@@ -1,2 +0,2 @@ | ||
import { ArrayOps, BoolOps } from '../wrapper'; | ||
import { ArrayOps, BoolOps } from '../lift'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Returns whether all items satisfies the predicate. |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ filter: typeof filter; |
@@ -1,2 +0,2 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
import { ArrayOps } from '../lift'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Filters this array by aplying a predicate to all items. |
import { Option } from '../option'; | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -5,0 +5,0 @@ find: typeof find; |
import { Option, None } from '../option'; | ||
import { ArrayOps } from '../wrapper'; | ||
import { ArrayOps } from '../lift'; | ||
/** | ||
@@ -4,0 +4,0 @@ * Finds the first item in this Array satisfying a predicate. |
import { Option } from '../option'; | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -5,0 +5,0 @@ findIndex: typeof findIndex; |
import { Option, None } from '../option'; | ||
import { ArrayOps } from '../wrapper'; | ||
import { ArrayOps } from '../lift'; | ||
/** | ||
@@ -4,0 +4,0 @@ * Finds the first item index in this Array satisfying a predicate. |
import { Option } from '../option'; | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -5,0 +5,0 @@ first: typeof first; |
import { Option } from '../option'; | ||
import { ArrayOps } from '../wrapper'; | ||
import { ArrayOps } from '../lift'; | ||
/** | ||
@@ -4,0 +4,0 @@ * Returns the first item of this Array, as an Option. |
import { Option } from '../option'; | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -5,0 +5,0 @@ flatMap: typeof flatMap; |
import { Option } from '../option'; | ||
import { ArrayOps, getValue } from '../wrapper'; | ||
import { ArrayOps, getValue } from '../lift'; | ||
/** | ||
@@ -4,0 +4,0 @@ * Maps this Array to an Array of Array | Option | ArrayOps using a mapper function then flattens it. |
import { Option } from '../option'; | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -5,0 +5,0 @@ flatten: typeof flatten; |
import { Option } from '../option'; | ||
import { ArrayOps } from '../wrapper'; | ||
import { ArrayOps } from '../lift'; | ||
/** | ||
@@ -4,0 +4,0 @@ * Flattens this Array of Arrays/Options. |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps, ObjectOps, NumberOps, StringOps, BoolOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps, ObjectOps, NumberOps, StringOps, BoolOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ fold: typeof fold; |
@@ -1,2 +0,2 @@ | ||
import lift, { ArrayOps } from '../wrapper'; | ||
import lift, { ArrayOps } from '../lift'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Folds this Array into a single value, using a starting value. |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps, ObjectOps, NumberOps, StringOps, BoolOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps, ObjectOps, NumberOps, StringOps, BoolOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ foldRight: typeof foldRight; |
@@ -1,2 +0,2 @@ | ||
import lift, { ArrayOps } from '../wrapper'; | ||
import lift, { ArrayOps } from '../lift'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Folds this Array into a single value, using a starting value, from the right. |
@@ -1,2 +0,2 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
import { ArrayOps } from '../lift'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Converts an Array-like object (such as an arguments or NodeList instance) to a regular Array |
@@ -1,2 +0,2 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
import { ArrayOps } from '../lift'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Converts an Array-like object (such as an arguments or NodeList instance) to a regular Array |
import { Option } from '../option'; | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -5,0 +5,0 @@ get: typeof get; |
import { Option } from '../option'; | ||
import { ArrayOps } from '../wrapper'; | ||
import { ArrayOps } from '../lift'; | ||
/** | ||
@@ -4,0 +4,0 @@ * Returns the item found at the provided index, as an Option. |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps, ObjectOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps, ObjectOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ groupBy: typeof groupBy; |
@@ -1,2 +0,2 @@ | ||
import { ArrayOps, ObjectOps } from '../wrapper'; | ||
import { ArrayOps, ObjectOps } from '../lift'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Creates an object composed of keys generated from the results of running each element through a discriminator function. |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ insert: typeof insert; |
@@ -1,2 +0,2 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
import { ArrayOps } from '../lift'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Insert an item at a specified index. |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ insertAll: typeof insertAll; |
@@ -1,2 +0,2 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
import { ArrayOps } from '../lift'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Insert an Array of items at a specified index. |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps, StringOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps, StringOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ join: typeof join; |
@@ -1,2 +0,2 @@ | ||
import { ArrayOps, StringOps } from '../wrapper'; | ||
import { ArrayOps, StringOps } from '../lift'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Joins the items into a string, using a separator. |
import { Option } from '../option'; | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -5,0 +5,0 @@ last: typeof last; |
import { Option } from '../option'; | ||
import { ArrayOps } from '../wrapper'; | ||
import { ArrayOps } from '../lift'; | ||
/** | ||
@@ -4,0 +4,0 @@ * Returns the last item of this Array, as an Option. |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps, Wrapper } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps, Wrapper } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ map: typeof map; |
@@ -1,2 +0,2 @@ | ||
import { ArrayOps, getValue } from '../wrapper'; | ||
import { ArrayOps, getValue } from '../lift'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Maps this Array using a mapper function. |
@@ -1,2 +0,2 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
import { ArrayOps } from '../lift'; | ||
export declare function range(start: number, stop?: number, step?: number): ArrayOps<number>; |
@@ -1,2 +0,2 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
import { ArrayOps } from '../lift'; | ||
/* | ||
@@ -3,0 +3,0 @@ * Returns a number[] wrapper with all numbers from start to stop (inclusive), |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ removeAt: typeof removeAt; |
@@ -1,2 +0,2 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
import { ArrayOps } from '../lift'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Removes the item found at the specified index. |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ reverse: typeof reverse; |
@@ -1,2 +0,2 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
import { ArrayOps } from '../lift'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Reverses the Array. |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps, BoolOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps, BoolOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ some: typeof some; |
@@ -1,2 +0,2 @@ | ||
import { ArrayOps, BoolOps } from '../wrapper'; | ||
import { ArrayOps, BoolOps } from '../lift'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Returns whether at least one item satisfies the predicate. |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ sort: typeof sort; |
@@ -1,2 +0,2 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
import { ArrayOps } from '../lift'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Sorts the Array. The sort is stable. |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ take: typeof take; |
@@ -1,2 +0,2 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
import { ArrayOps } from '../lift'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Takes the first 'count' items from this Array. |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ takeRight: typeof takeRight; |
@@ -1,2 +0,2 @@ | ||
import { ArrayOps } from '../wrapper'; | ||
import { ArrayOps } from '../lift'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Takes the last 'count' items from this Array. |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps, ObjectOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps, ObjectOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ toSet: typeof toSet; |
@@ -1,2 +0,2 @@ | ||
import { ArrayOps, ObjectOps } from '../wrapper'; | ||
import { ArrayOps, ObjectOps } from '../lift'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Converts this Array of numbers or strings to a Set-like object where values are all truthy. |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps, Wrapper } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ArrayOps, Wrapper } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -4,0 +4,0 @@ updateAt: typeof updateAt; |
@@ -1,2 +0,2 @@ | ||
import { ArrayOps, getValue } from '../wrapper'; | ||
import { ArrayOps, getValue } from '../lift'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Updates an item at the specified index. |
@@ -1,4 +0,4 @@ | ||
import lift from './wrapper'; | ||
import lift from './lift'; | ||
export default lift; | ||
export { ArrayOps, ObjectOps, BoolOps, NumberOps, StringOps, Wrapper, getValue } from './wrapper'; | ||
export { ArrayOps, ObjectOps, BoolOps, NumberOps, StringOps, Wrapper, getValue } from './lift'; | ||
export { update, deepUpdate, DELETE } from 'immupdate'; | ||
@@ -5,0 +5,0 @@ export { Option, None, Some } from './option'; |
@@ -1,4 +0,4 @@ | ||
import lift from './wrapper'; | ||
import lift from './lift'; | ||
export default lift; | ||
export { ArrayOps, ObjectOps, BoolOps, NumberOps, StringOps, getValue } from './wrapper'; | ||
export { ArrayOps, ObjectOps, BoolOps, NumberOps, StringOps, getValue } from './lift'; | ||
export { update, deepUpdate, DELETE } from 'immupdate'; | ||
@@ -5,0 +5,0 @@ export { Option, None, Some } from './option'; |
@@ -1,3 +0,3 @@ | ||
import { ObjectOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ObjectOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ObjectOps<A> { | ||
@@ -4,0 +4,0 @@ add: typeof add; |
@@ -1,2 +0,2 @@ | ||
import { ObjectOps } from '../wrapper'; | ||
import { ObjectOps } from '../lift'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Adds a key/value to this "Map" object. |
@@ -1,3 +0,3 @@ | ||
import { ObjectOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ObjectOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ObjectOps<A> { | ||
@@ -4,0 +4,0 @@ filter: typeof filter; |
@@ -1,2 +0,2 @@ | ||
import { ObjectOps } from '../wrapper'; | ||
import { ObjectOps } from '../lift'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Filter keys/values of a "Map" object |
import { Option } from '../option'; | ||
import { ObjectOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ObjectOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ObjectOps<A> { | ||
@@ -5,0 +5,0 @@ get: typeof get; |
import { Option } from '../option'; | ||
import { ObjectOps } from '../wrapper'; | ||
import { ObjectOps } from '../lift'; | ||
/** | ||
@@ -4,0 +4,0 @@ * Returns the value found at the provided key, as an Option. |
@@ -1,3 +0,3 @@ | ||
import { ObjectOps, ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ObjectOps, ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ObjectOps<A> { | ||
@@ -4,0 +4,0 @@ keys: typeof keys; |
@@ -1,2 +0,2 @@ | ||
import { ObjectOps, ArrayOps } from '../wrapper'; | ||
import { ObjectOps, ArrayOps } from '../lift'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Creates an Array of all this object's keys, in no particular order. |
@@ -1,3 +0,3 @@ | ||
import { ObjectOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ObjectOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ObjectOps<A> { | ||
@@ -4,0 +4,0 @@ mapValues: typeof mapValues; |
@@ -1,2 +0,2 @@ | ||
import { ObjectOps } from '../wrapper'; | ||
import { ObjectOps } from '../lift'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Maps all the values of this object. |
@@ -1,3 +0,3 @@ | ||
import { ObjectOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ObjectOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ObjectOps<A> { | ||
@@ -4,0 +4,0 @@ remove: typeof remove; |
@@ -1,2 +0,2 @@ | ||
import { ObjectOps } from '../wrapper'; | ||
import { ObjectOps } from '../lift'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Returns an Object where the given keys are removed. |
@@ -1,2 +0,2 @@ | ||
import { ObjectOps } from '../wrapper'; | ||
import { ObjectOps } from '../lift'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Creates a Set-like object (string keys, true values) from a list of keys |
@@ -1,2 +0,2 @@ | ||
import { ObjectOps } from '../wrapper'; | ||
import { ObjectOps } from '../lift'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Creates a Set-like object (string keys, true values) from a list of keys |
@@ -1,3 +0,3 @@ | ||
import { ObjectOps, ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ObjectOps, ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ObjectOps<A> { | ||
@@ -4,0 +4,0 @@ toArray: typeof toArray; |
@@ -1,2 +0,2 @@ | ||
import { ObjectOps, ArrayOps } from '../wrapper'; | ||
import { ObjectOps, ArrayOps } from '../lift'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Converts this object to an Array of tuples. |
@@ -1,3 +0,3 @@ | ||
import { ObjectOps, ArrayOps } from '../wrapper'; | ||
declare module '../wrapper' { | ||
import { ObjectOps, ArrayOps } from '../lift'; | ||
declare module '../../wrapper' { | ||
interface ObjectOps<A> { | ||
@@ -4,0 +4,0 @@ values: typeof values; |
@@ -1,2 +0,2 @@ | ||
import { ObjectOps, ArrayOps } from '../wrapper'; | ||
import { ObjectOps, ArrayOps } from '../lift'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Creates an Array of all this object's values. |
@@ -1,2 +0,2 @@ | ||
import { Wrapper, ArrayOps } from '../wrapper'; | ||
import { Wrapper, ArrayOps } from '../lift'; | ||
export interface Option<A> { | ||
@@ -3,0 +3,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
import lift, { getValue } from '../wrapper'; | ||
import lift, { getValue } from '../lift'; | ||
// The Option factory / static object | ||
@@ -3,0 +3,0 @@ var OptionObject = function (value) { |
@@ -1,2 +0,2 @@ | ||
import { Wrapper } from '../wrapper'; | ||
import { Wrapper } from '../lift'; | ||
export interface ResultOps<E, A> { | ||
@@ -3,0 +3,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
import { getValue } from '../wrapper'; | ||
import { getValue } from '../lift'; | ||
var ResultObject = {}; | ||
@@ -3,0 +3,0 @@ ResultObject.all = function () { |
@@ -1,3 +0,3 @@ | ||
import { ArrayOps, ObjectOps, NumberOps, StringOps, BoolOps, Wrapper } from './wrapper'; | ||
declare module './wrapper' { | ||
import { ArrayOps, ObjectOps, NumberOps, StringOps, BoolOps, Wrapper } from './lift'; | ||
declare module '../wrapper' { | ||
interface ArrayOps<A> { | ||
@@ -7,3 +7,3 @@ transform: typeof transform; | ||
} | ||
declare module './wrapper' { | ||
declare module '../wrapper' { | ||
interface ObjectOps<A> { | ||
@@ -13,3 +13,3 @@ transform: typeof transform; | ||
} | ||
declare module './wrapper' { | ||
declare module '../wrapper' { | ||
interface NumberOps { | ||
@@ -19,3 +19,3 @@ transform: typeof transform; | ||
} | ||
declare module './wrapper' { | ||
declare module '../wrapper' { | ||
interface StringOps { | ||
@@ -25,3 +25,3 @@ transform: typeof transform; | ||
} | ||
declare module './wrapper' { | ||
declare module '../wrapper' { | ||
interface BoolOps { | ||
@@ -28,0 +28,0 @@ transform: typeof transform; |
@@ -1,2 +0,2 @@ | ||
import lift, { ArrayOps, ObjectOps, NumberOps, StringOps, BoolOps } from './wrapper'; | ||
import lift, { ArrayOps, ObjectOps, NumberOps, StringOps, BoolOps } from './lift'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Runs an arbitrary transformation. |
@@ -0,1 +1,3 @@ | ||
import { Wrapper } from '../lift'; | ||
export { Wrapper } from '../lift'; | ||
export interface Lift { | ||
@@ -15,6 +17,2 @@ /** Wraps a Number to provide a richer API. Unwrap with .value() **/ | ||
export default lift; | ||
export interface Wrapper<A> { | ||
_isLiftWrapper: {}; | ||
value(): A; | ||
} | ||
export declare function getValue<A>(input: A | Wrapper<A>): A; | ||
@@ -21,0 +19,0 @@ export declare class ArrayOps<A> implements Wrapper<A[]> { |
{ | ||
"name": "space-lift", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"description": "Idiomatic TS array, object utils, Option, Result monads", | ||
@@ -5,0 +5,0 @@ |
134093
206
3723