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.
Files changed (89) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +1 -1
  3. package/apply.js +6 -17
  4. package/compose.js +3 -16
  5. package/curry.js +6 -20
  6. package/either/either-sync.d.ts +1 -1
  7. package/either/either-sync.js +5 -8
  8. package/either/either.d.ts +2 -2
  9. package/either/either.js +5 -8
  10. package/either/index.d.ts +4 -4
  11. package/either/index.js +4 -11
  12. package/either/left.js +8 -13
  13. package/either/operators/bifold/bifold.d.ts +3 -3
  14. package/either/operators/bifold/bifold.js +7 -10
  15. package/either/operators/bifold/bifoldl.d.ts +2 -2
  16. package/either/operators/bifold/bifoldl.js +5 -8
  17. package/either/operators/bifold/bifoldr.d.ts +2 -2
  18. package/either/operators/bifold/bifoldr.js +5 -8
  19. package/either/operators/bifold/index.d.ts +3 -3
  20. package/either/operators/bifold/index.js +3 -9
  21. package/either/operators/bifold-map/bifold-map.d.ts +1 -1
  22. package/either/operators/bifold-map/bifold-map.js +16 -23
  23. package/either/operators/bifold-map/bifoldl-map.d.ts +3 -3
  24. package/either/operators/bifold-map/bifoldl-map.js +9 -16
  25. package/either/operators/bifold-map/bifoldr-map.d.ts +3 -3
  26. package/either/operators/bifold-map/bifoldr-map.js +9 -16
  27. package/either/operators/bifold-map/index.d.ts +3 -3
  28. package/either/operators/bifold-map/index.js +3 -9
  29. package/either/operators/bimap/bimap.d.ts +1 -1
  30. package/either/operators/bimap/bimap.js +10 -17
  31. package/either/operators/bimap/first.d.ts +2 -2
  32. package/either/operators/bimap/first.js +12 -19
  33. package/either/operators/bimap/index.d.ts +3 -3
  34. package/either/operators/bimap/index.js +3 -9
  35. package/either/operators/bimap/second.d.ts +2 -2
  36. package/either/operators/bimap/second.js +12 -19
  37. package/either/operators/bindr.d.ts +1 -1
  38. package/either/operators/bindr.js +11 -18
  39. package/either/operators/guards.d.ts +3 -3
  40. package/either/operators/guards.js +7 -13
  41. package/either/operators/index.d.ts +5 -5
  42. package/either/operators/index.js +5 -30
  43. package/either/right.js +8 -13
  44. package/guard.d.ts +3 -3
  45. package/guard.js +8 -19
  46. package/identity.js +1 -4
  47. package/index.d.ts +9 -11
  48. package/index.js +9 -25
  49. package/inject.js +7 -18
  50. package/{get.d.ts → lens/get.d.ts} +8 -3
  51. package/lens/get.js +29 -0
  52. package/lens/index.d.ts +3 -0
  53. package/lens/index.js +3 -0
  54. package/lens/lens.d.ts +19 -0
  55. package/lens/lens.js +17 -0
  56. package/{set.d.ts → lens/set.d.ts} +11 -5
  57. package/lens/set.js +45 -0
  58. package/maybe/index.d.ts +3 -3
  59. package/maybe/index.js +3 -9
  60. package/maybe/just.js +8 -13
  61. package/maybe/maybe.d.ts +2 -2
  62. package/maybe/maybe.js +5 -8
  63. package/maybe/nothing.js +7 -12
  64. package/maybe/operators/bind.d.ts +1 -1
  65. package/maybe/operators/bind.js +11 -18
  66. package/maybe/operators/fmap.d.ts +1 -1
  67. package/maybe/operators/fmap.js +12 -19
  68. package/maybe/operators/fold-map.d.ts +3 -3
  69. package/maybe/operators/fold-map.js +9 -16
  70. package/maybe/operators/fold.d.ts +3 -3
  71. package/maybe/operators/fold.js +7 -10
  72. package/maybe/operators/guards.d.ts +3 -3
  73. package/maybe/operators/guards.js +7 -13
  74. package/maybe/operators/index.d.ts +5 -5
  75. package/maybe/operators/index.js +5 -26
  76. package/package.json +11 -4
  77. package/permutation/index.d.ts +2 -2
  78. package/permutation/index.js +2 -7
  79. package/permutation/permutation-2.js +5 -12
  80. package/permutation/permutation-3.d.ts +1 -1
  81. package/permutation/permutation-3.js +5 -12
  82. package/pipe.js +4 -16
  83. package/rethrow.js +3 -6
  84. package/tap.d.ts +1 -1
  85. package/tap.js +4 -7
  86. package/tsconfig.json +2 -3
  87. package/types/index.d.ts +10 -10
  88. package/get.js +0 -26
  89. package/set.js +0 -42
package/types/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- export type { Map } from './map'
2
- export type { Last } from './last'
3
- export type { Trim } from './trim'
4
- export type { Slice } from './slice'
5
- export type { Tuple } from './tuple'
6
- export type { Effect } from './effect'
7
- export type { Gradual } from './gradual'
8
- export type { Unshift } from './unshift'
9
- export type { Flatten } from './flatten'
10
- export type { UnaryFunction, VariadicFunction } from './function'
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;