fnts 2.2.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +1 -1
- package/apply.js +6 -17
- package/compose.js +3 -16
- package/curry.js +6 -20
- package/either/either-sync.d.ts +1 -1
- package/either/either-sync.js +5 -8
- package/either/either.d.ts +2 -2
- package/either/either.js +5 -8
- package/either/index.d.ts +4 -4
- package/either/index.js +4 -11
- package/either/left.js +8 -13
- package/either/operators/bifold/bifold.d.ts +3 -3
- package/either/operators/bifold/bifold.js +7 -10
- package/either/operators/bifold/bifoldl.d.ts +2 -2
- package/either/operators/bifold/bifoldl.js +5 -8
- package/either/operators/bifold/bifoldr.d.ts +2 -2
- package/either/operators/bifold/bifoldr.js +5 -8
- package/either/operators/bifold/index.d.ts +3 -3
- package/either/operators/bifold/index.js +3 -9
- package/either/operators/bifold-map/bifold-map.d.ts +1 -1
- package/either/operators/bifold-map/bifold-map.js +16 -23
- package/either/operators/bifold-map/bifoldl-map.d.ts +3 -3
- package/either/operators/bifold-map/bifoldl-map.js +9 -16
- package/either/operators/bifold-map/bifoldr-map.d.ts +3 -3
- package/either/operators/bifold-map/bifoldr-map.js +9 -16
- package/either/operators/bifold-map/index.d.ts +3 -3
- package/either/operators/bifold-map/index.js +3 -9
- package/either/operators/bimap/bimap.d.ts +1 -1
- package/either/operators/bimap/bimap.js +10 -17
- package/either/operators/bimap/first.d.ts +2 -2
- package/either/operators/bimap/first.js +12 -19
- package/either/operators/bimap/index.d.ts +3 -3
- package/either/operators/bimap/index.js +3 -9
- package/either/operators/bimap/second.d.ts +2 -2
- package/either/operators/bimap/second.js +12 -19
- package/either/operators/bindr.d.ts +1 -1
- package/either/operators/bindr.js +11 -18
- package/either/operators/guards.d.ts +3 -3
- package/either/operators/guards.js +7 -13
- package/either/operators/index.d.ts +5 -5
- package/either/operators/index.js +5 -30
- package/either/right.js +8 -13
- package/guard.d.ts +3 -3
- package/guard.js +8 -19
- package/identity.js +1 -4
- package/index.d.ts +9 -11
- package/index.js +9 -25
- package/inject.js +7 -18
- package/{get.d.ts → lens/get.d.ts} +8 -3
- package/lens/get.js +29 -0
- package/lens/index.d.ts +3 -0
- package/lens/index.js +3 -0
- package/lens/lens.d.ts +19 -0
- package/lens/lens.js +17 -0
- package/{set.d.ts → lens/set.d.ts} +11 -5
- package/lens/set.js +45 -0
- package/maybe/index.d.ts +3 -3
- package/maybe/index.js +3 -9
- package/maybe/just.js +8 -13
- package/maybe/maybe.d.ts +2 -2
- package/maybe/maybe.js +5 -8
- package/maybe/nothing.js +7 -12
- package/maybe/operators/bind.d.ts +1 -1
- package/maybe/operators/bind.js +11 -18
- package/maybe/operators/fmap.d.ts +1 -1
- package/maybe/operators/fmap.js +12 -19
- package/maybe/operators/fold-map.d.ts +3 -3
- package/maybe/operators/fold-map.js +9 -16
- package/maybe/operators/fold.d.ts +3 -3
- package/maybe/operators/fold.js +7 -10
- package/maybe/operators/guards.d.ts +3 -3
- package/maybe/operators/guards.js +7 -13
- package/maybe/operators/index.d.ts +5 -5
- package/maybe/operators/index.js +5 -26
- package/package.json +11 -4
- package/permutation/index.d.ts +2 -2
- package/permutation/index.js +2 -7
- package/permutation/permutation-2.js +5 -12
- package/permutation/permutation-3.d.ts +1 -1
- package/permutation/permutation-3.js +5 -12
- package/pipe.js +4 -16
- package/rethrow.js +3 -6
- package/tap.d.ts +1 -1
- package/tap.js +4 -7
- package/tsconfig.json +2 -3
- package/types/index.d.ts +10 -10
- package/get.js +0 -26
- package/set.js +0 -42
package/types/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export type
|
|
2
|
-
export type
|
|
3
|
-
export type
|
|
4
|
-
export type
|
|
5
|
-
export type
|
|
6
|
-
export type
|
|
7
|
-
export type
|
|
8
|
-
export type
|
|
9
|
-
export type
|
|
10
|
-
export type
|
|
1
|
+
export type * from './map'
|
|
2
|
+
export type * from './last'
|
|
3
|
+
export type * from './trim'
|
|
4
|
+
export type * from './slice'
|
|
5
|
+
export type * from './tuple'
|
|
6
|
+
export type * from './effect'
|
|
7
|
+
export type * from './gradual'
|
|
8
|
+
export type * from './unshift'
|
|
9
|
+
export type * from './flatten'
|
|
10
|
+
export type * from './function'
|
package/get.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* @module Get
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var permutation_2_1 = require("./permutation/permutation-2");
|
|
7
|
-
/**
|
|
8
|
-
* Gets the value inside a nested `source` object by provided `path`
|
|
9
|
-
* written in dot-notation.
|
|
10
|
-
*/
|
|
11
|
-
function get() {
|
|
12
|
-
var args = [];
|
|
13
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
14
|
-
args[_i] = arguments[_i];
|
|
15
|
-
}
|
|
16
|
-
return (0, permutation_2_1.default)(function (source, path) {
|
|
17
|
-
var keys = path.split('.');
|
|
18
|
-
var length = keys.length;
|
|
19
|
-
var result = source;
|
|
20
|
-
for (var index = 0; index < length; index += 1) {
|
|
21
|
-
result = result === null || result === void 0 ? void 0 : result[keys === null || keys === void 0 ? void 0 : keys[index]];
|
|
22
|
-
}
|
|
23
|
-
return result;
|
|
24
|
-
}).apply(void 0, args);
|
|
25
|
-
}
|
|
26
|
-
exports.default = get;
|
package/set.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* @module Set
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var permutation_3_1 = require("./permutation/permutation-3");
|
|
7
|
-
/**
|
|
8
|
-
* Sets the `value` inside a nested `source` object by provided `path`
|
|
9
|
-
* written in dot-notation.
|
|
10
|
-
*/
|
|
11
|
-
function set() {
|
|
12
|
-
var args = [];
|
|
13
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
14
|
-
args[_i] = arguments[_i];
|
|
15
|
-
}
|
|
16
|
-
// @ts-ignore
|
|
17
|
-
return (0, permutation_3_1.default)(
|
|
18
|
-
// @ts-ignore
|
|
19
|
-
function (source, path, value
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
) {
|
|
22
|
-
// @ts-ignore
|
|
23
|
-
var keys = path.split('.');
|
|
24
|
-
var length = keys.length;
|
|
25
|
-
var result = structuredClone(source);
|
|
26
|
-
if (length === 0) {
|
|
27
|
-
result[path] = value;
|
|
28
|
-
}
|
|
29
|
-
var scope = result[keys[0]];
|
|
30
|
-
for (var index = 1; index < length; index += 1) {
|
|
31
|
-
if (index === length - 1) {
|
|
32
|
-
scope[keys === null || keys === void 0 ? void 0 : keys[index]] = value;
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
scope = scope === null || scope === void 0 ? void 0 : scope[keys === null || keys === void 0 ? void 0 : keys[index]];
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
// @ts-ignore
|
|
39
|
-
return result;
|
|
40
|
-
}).apply(void 0, args);
|
|
41
|
-
}
|
|
42
|
-
exports.default = set;
|