anyone 2.0.0 → 2.0.2

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 (115) hide show
  1. package/CHANGELOG.md +1 -16
  2. package/README.md +26 -98
  3. package/all/package.json +12 -5
  4. package/any/package.json +12 -5
  5. package/dist/all-G56EfCZm.cjs +18 -0
  6. package/dist/all-G56EfCZm.cjs.map +1 -0
  7. package/dist/all-jZqtYMoF.mjs +13 -0
  8. package/dist/all-jZqtYMoF.mjs.map +1 -0
  9. package/dist/any-7W0t-5U9.cjs +18 -0
  10. package/dist/any-7W0t-5U9.cjs.map +1 -0
  11. package/dist/any-Bu9n0b6b.mjs +13 -0
  12. package/dist/any-Bu9n0b6b.mjs.map +1 -0
  13. package/dist/anyone.cjs +10 -0
  14. package/dist/anyone.mjs +7 -0
  15. package/dist/exports/all.cjs +4 -0
  16. package/dist/exports/all.mjs +4 -0
  17. package/dist/exports/any.cjs +4 -0
  18. package/dist/exports/any.mjs +4 -0
  19. package/dist/exports/none.cjs +4 -0
  20. package/dist/exports/none.mjs +4 -0
  21. package/dist/exports/one.cjs +4 -0
  22. package/dist/exports/one.mjs +4 -0
  23. package/dist/none-BaiW3V_k.mjs +14 -0
  24. package/dist/none-BaiW3V_k.mjs.map +1 -0
  25. package/dist/none-BvnsAgF8.cjs +19 -0
  26. package/dist/none-BvnsAgF8.cjs.map +1 -0
  27. package/dist/one-C-TngTWp.cjs +23 -0
  28. package/dist/one-C-TngTWp.cjs.map +1 -0
  29. package/dist/one-D5UWawb-.mjs +18 -0
  30. package/dist/one-D5UWawb-.mjs.map +1 -0
  31. package/dist/runAnyoneMethods-BnV5_696.cjs +26 -0
  32. package/dist/runAnyoneMethods-BnV5_696.cjs.map +1 -0
  33. package/dist/runAnyoneMethods-CiYJATON.mjs +21 -0
  34. package/dist/runAnyoneMethods-CiYJATON.mjs.map +1 -0
  35. package/none/package.json +12 -5
  36. package/one/package.json +12 -5
  37. package/package.json +68 -146
  38. package/src/__tests__/all.test.ts +47 -0
  39. package/src/__tests__/any.test.ts +60 -0
  40. package/src/__tests__/anyoneTestValues.ts +3 -0
  41. package/src/__tests__/none.test.ts +60 -0
  42. package/src/__tests__/one.test.ts +56 -0
  43. package/src/__tests__/runAnyoneMethods.test.ts +43 -0
  44. package/src/anyone.ts +4 -0
  45. package/src/exports/all.ts +8 -0
  46. package/src/exports/any.ts +8 -0
  47. package/src/exports/none.ts +10 -0
  48. package/src/exports/one.ts +20 -0
  49. package/src/runner/runAnyoneMethods.ts +21 -0
  50. package/types/{all.d.ts → all-8-fac2En.d.mts} +4 -1
  51. package/types/all-8-fac2En.d.mts.map +1 -0
  52. package/types/all-DT3n67Q2.d.cts +8 -0
  53. package/types/all-DT3n67Q2.d.cts.map +1 -0
  54. package/types/{any.d.ts → any-BDnUW0EC.d.mts} +4 -1
  55. package/types/any-BDnUW0EC.d.mts.map +1 -0
  56. package/types/any-BMwz5-AB.d.cts +8 -0
  57. package/types/any-BMwz5-AB.d.cts.map +1 -0
  58. package/types/anyone.d.cts +5 -0
  59. package/types/anyone.d.mts +5 -0
  60. package/types/anyone.d.ts +5 -17
  61. package/types/exports/all.d.cts +2 -0
  62. package/types/exports/all.d.mts +2 -0
  63. package/types/exports/any.d.cts +2 -0
  64. package/types/exports/any.d.mts +2 -0
  65. package/types/exports/none.d.cts +2 -0
  66. package/types/exports/none.d.mts +2 -0
  67. package/types/exports/one.d.cts +2 -0
  68. package/types/exports/one.d.mts +2 -0
  69. package/types/{none.d.ts → none-CKjw9Aoz.d.mts} +4 -1
  70. package/types/none-CKjw9Aoz.d.mts.map +1 -0
  71. package/types/none-D0Wo1a6R.d.cts +8 -0
  72. package/types/none-D0Wo1a6R.d.cts.map +1 -0
  73. package/types/{one.d.ts → one-BuVF-m86.d.cts} +4 -1
  74. package/types/one-BuVF-m86.d.cts.map +1 -0
  75. package/types/one-PuTrzIUg.d.mts +8 -0
  76. package/types/one-PuTrzIUg.d.mts.map +1 -0
  77. package/vitest.config.ts +21 -0
  78. package/dist/cjs/all.development.js +0 -37
  79. package/dist/cjs/all.js +0 -7
  80. package/dist/cjs/all.production.js +0 -1
  81. package/dist/cjs/any.development.js +0 -37
  82. package/dist/cjs/any.js +0 -7
  83. package/dist/cjs/any.production.js +0 -1
  84. package/dist/cjs/anyone.development.js +0 -94
  85. package/dist/cjs/anyone.js +0 -7
  86. package/dist/cjs/anyone.production.js +0 -1
  87. package/dist/cjs/none.development.js +0 -47
  88. package/dist/cjs/none.js +0 -7
  89. package/dist/cjs/none.production.js +0 -1
  90. package/dist/cjs/one.development.js +0 -46
  91. package/dist/cjs/one.js +0 -7
  92. package/dist/cjs/one.production.js +0 -1
  93. package/dist/cjs/package.json +0 -1
  94. package/dist/es/all.development.js +0 -35
  95. package/dist/es/all.production.js +0 -1
  96. package/dist/es/any.development.js +0 -35
  97. package/dist/es/any.production.js +0 -1
  98. package/dist/es/anyone.development.js +0 -87
  99. package/dist/es/anyone.production.js +0 -1
  100. package/dist/es/none.development.js +0 -45
  101. package/dist/es/none.production.js +0 -1
  102. package/dist/es/one.development.js +0 -44
  103. package/dist/es/one.production.js +0 -1
  104. package/dist/es/package.json +0 -1
  105. package/dist/umd/all.development.js +0 -43
  106. package/dist/umd/all.production.js +0 -1
  107. package/dist/umd/any.development.js +0 -43
  108. package/dist/umd/any.production.js +0 -1
  109. package/dist/umd/anyone.development.js +0 -100
  110. package/dist/umd/anyone.production.js +0 -1
  111. package/dist/umd/none.development.js +0 -53
  112. package/dist/umd/none.production.js +0 -1
  113. package/dist/umd/one.development.js +0 -52
  114. package/dist/umd/one.production.js +0 -1
  115. package/tsconfig.json +0 -8
package/types/anyone.d.ts CHANGED
@@ -1,17 +1,5 @@
1
- /**
2
- * Checks that at all passed arguments evaluate to a truthy value.
3
- */
4
- declare function all(...args: unknown[]): boolean;
5
- /**
6
- * Checks that at least one passed argument evaluates to a truthy value.
7
- */
8
- declare function any(...args: unknown[]): boolean;
9
- /**
10
- * Checks that at none of the passed arguments evaluate to a truthy value.
11
- */
12
- declare function none(...args: unknown[]): boolean;
13
- /**
14
- * Checks that at only one passed argument evaluates to a truthy value.
15
- */
16
- declare function one(...args: unknown[]): boolean;
17
- export { all, any, none, one };
1
+ import { t as all } from "./all-DT3n67Q2.cjs";
2
+ import { t as any } from "./any-BMwz5-AB.cjs";
3
+ import { t as none } from "./none-D0Wo1a6R.cjs";
4
+ import { t as one } from "./one-BuVF-m86.cjs";
5
+ export { all, any, none, one };
@@ -0,0 +1,2 @@
1
+ import { t as all } from "../all-DT3n67Q2.cjs";
2
+ export = all;
@@ -0,0 +1,2 @@
1
+ import { t as all } from "../all-8-fac2En.mjs";
2
+ export { all as default };
@@ -0,0 +1,2 @@
1
+ import { t as any } from "../any-BMwz5-AB.cjs";
2
+ export = any;
@@ -0,0 +1,2 @@
1
+ import { t as any } from "../any-BDnUW0EC.mjs";
2
+ export { any as default };
@@ -0,0 +1,2 @@
1
+ import { t as none } from "../none-D0Wo1a6R.cjs";
2
+ export = none;
@@ -0,0 +1,2 @@
1
+ import { t as none } from "../none-CKjw9Aoz.mjs";
2
+ export { none as default };
@@ -0,0 +1,2 @@
1
+ import { t as one } from "../one-BuVF-m86.cjs";
2
+ export = one;
@@ -0,0 +1,2 @@
1
+ import { t as one } from "../one-PuTrzIUg.mjs";
2
+ export { one as default };
@@ -1,5 +1,8 @@
1
+ //#region src/exports/none.d.ts
1
2
  /**
2
3
  * Checks that at none of the passed arguments evaluate to a truthy value.
3
4
  */
4
5
  declare function none(...args: unknown[]): boolean;
5
- export { none as default };
6
+ //#endregion
7
+ export { none as t };
8
+ //# sourceMappingURL=none-CKjw9Aoz.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"none-CKjw9Aoz.d.mts","names":["none","default"],"sources":["../src/exports/none.d.ts"],"sourcesContent":["/**\n * Checks that at none of the passed arguments evaluate to a truthy value.\n */\nexport default function none(...args: unknown[]): boolean;\n"],"mappings":";;;;iBAGwBA,IAAAA"}
@@ -0,0 +1,8 @@
1
+ //#region src/exports/none.d.ts
2
+ /**
3
+ * Checks that at none of the passed arguments evaluate to a truthy value.
4
+ */
5
+ declare function none(...args: unknown[]): boolean;
6
+ //#endregion
7
+ export { none as t };
8
+ //# sourceMappingURL=none-D0Wo1a6R.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"none-D0Wo1a6R.d.cts","names":["none","default"],"sources":["../src/exports/none.d.ts"],"sourcesContent":["/**\n * Checks that at none of the passed arguments evaluate to a truthy value.\n */\nexport default function none(...args: unknown[]): boolean;\n"],"mappings":";;;;iBAGwBA,IAAAA"}
@@ -1,5 +1,8 @@
1
+ //#region src/exports/one.d.ts
1
2
  /**
2
3
  * Checks that at only one passed argument evaluates to a truthy value.
3
4
  */
4
5
  declare function one(...args: unknown[]): boolean;
5
- export { one as default };
6
+ //#endregion
7
+ export { one as t };
8
+ //# sourceMappingURL=one-BuVF-m86.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"one-BuVF-m86.d.cts","names":["one","default"],"sources":["../src/exports/one.d.ts"],"sourcesContent":["/**\n * Checks that at only one passed argument evaluates to a truthy value.\n */\nexport default function one(...args: unknown[]): boolean;\n"],"mappings":";;;;iBAGwBA,GAAAA"}
@@ -0,0 +1,8 @@
1
+ //#region src/exports/one.d.ts
2
+ /**
3
+ * Checks that at only one passed argument evaluates to a truthy value.
4
+ */
5
+ declare function one(...args: unknown[]): boolean;
6
+ //#endregion
7
+ export { one as t };
8
+ //# sourceMappingURL=one-PuTrzIUg.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"one-PuTrzIUg.d.mts","names":["one","default"],"sources":["../src/exports/one.d.ts"],"sourcesContent":["/**\n * Checks that at only one passed argument evaluates to a truthy value.\n */\nexport default function one(...args: unknown[]): boolean;\n"],"mappings":";;;;iBAGwBA,GAAAA"}
@@ -0,0 +1,21 @@
1
+ import path, { resolve } from 'path';
2
+ import { fileURLToPath } from 'url';
3
+
4
+ import { defineConfig } from 'vitest/config';
5
+
6
+ const __filename = fileURLToPath(import.meta.url);
7
+ const __dirname = path.dirname(__filename);
8
+
9
+ export default defineConfig({
10
+ test: {
11
+ globals: true,
12
+ include: ['./**/__tests__/*.test.ts'],
13
+ setupFiles: [resolve(__dirname, '../../', 'vx/config/vitest')],
14
+ },
15
+ root: __dirname,
16
+ resolve: {
17
+ alias: {
18
+ anyone: resolve(__dirname, 'src/anyone.ts'),
19
+ },
20
+ },
21
+ });
@@ -1,37 +0,0 @@
1
- 'use strict';
2
-
3
- function isFunction(value) {
4
- return typeof value === 'function';
5
- }
6
-
7
- /**
8
- * Accepts a value or a function, and coerces it into a boolean value
9
- */
10
- function run(arg) {
11
- if (isFunction(arg)) {
12
- try {
13
- return check(arg());
14
- }
15
- catch (err) {
16
- return false;
17
- }
18
- }
19
- return check(arg);
20
- }
21
- function check(value) {
22
- // We use abstract equality intentionally here. This enables falsy valueOf support.
23
- return Array.isArray(value) ? true : value != false && Boolean(value); // eslint-disable-line
24
- }
25
-
26
- /**
27
- * Checks that at all passed arguments evaluate to a truthy value.
28
- */
29
- function all() {
30
- var args = [];
31
- for (var _i = 0; _i < arguments.length; _i++) {
32
- args[_i] = arguments[_i];
33
- }
34
- return args.every(run);
35
- }
36
-
37
- module.exports = all;
package/dist/cjs/all.js DELETED
@@ -1,7 +0,0 @@
1
- 'use strict'
2
-
3
- if (process.env.NODE_ENV === 'production') {
4
- module.exports = require('./all.production.js');
5
- } else {
6
- module.exports = require('./all.development.js');
7
- }
@@ -1 +0,0 @@
1
- "use strict";function r(r){if(function(r){return"function"==typeof r}(r))try{return t(r())}catch(r){return!1}return t(r)}function t(r){return!!Array.isArray(r)||0!=r&&!!r}module.exports=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.every(r)};
@@ -1,37 +0,0 @@
1
- 'use strict';
2
-
3
- function isFunction(value) {
4
- return typeof value === 'function';
5
- }
6
-
7
- /**
8
- * Accepts a value or a function, and coerces it into a boolean value
9
- */
10
- function run(arg) {
11
- if (isFunction(arg)) {
12
- try {
13
- return check(arg());
14
- }
15
- catch (err) {
16
- return false;
17
- }
18
- }
19
- return check(arg);
20
- }
21
- function check(value) {
22
- // We use abstract equality intentionally here. This enables falsy valueOf support.
23
- return Array.isArray(value) ? true : value != false && Boolean(value); // eslint-disable-line
24
- }
25
-
26
- /**
27
- * Checks that at least one passed argument evaluates to a truthy value.
28
- */
29
- function any() {
30
- var args = [];
31
- for (var _i = 0; _i < arguments.length; _i++) {
32
- args[_i] = arguments[_i];
33
- }
34
- return args.some(run);
35
- }
36
-
37
- module.exports = any;
package/dist/cjs/any.js DELETED
@@ -1,7 +0,0 @@
1
- 'use strict'
2
-
3
- if (process.env.NODE_ENV === 'production') {
4
- module.exports = require('./any.production.js');
5
- } else {
6
- module.exports = require('./any.development.js');
7
- }
@@ -1 +0,0 @@
1
- "use strict";function r(r){if(function(r){return"function"==typeof r}(r))try{return t(r())}catch(r){return!1}return t(r)}function t(r){return!!Array.isArray(r)||0!=r&&!!r}module.exports=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.some(r)};
@@ -1,94 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- function isFunction(value) {
6
- return typeof value === 'function';
7
- }
8
-
9
- /**
10
- * Accepts a value or a function, and coerces it into a boolean value
11
- */
12
- function run(arg) {
13
- if (isFunction(arg)) {
14
- try {
15
- return check(arg());
16
- }
17
- catch (err) {
18
- return false;
19
- }
20
- }
21
- return check(arg);
22
- }
23
- function check(value) {
24
- // We use abstract equality intentionally here. This enables falsy valueOf support.
25
- return Array.isArray(value) ? true : value != false && Boolean(value); // eslint-disable-line
26
- }
27
-
28
- /**
29
- * Checks that at all passed arguments evaluate to a truthy value.
30
- */
31
- function all() {
32
- var args = [];
33
- for (var _i = 0; _i < arguments.length; _i++) {
34
- args[_i] = arguments[_i];
35
- }
36
- return args.every(run);
37
- }
38
-
39
- /**
40
- * Checks that at least one passed argument evaluates to a truthy value.
41
- */
42
- function any() {
43
- var args = [];
44
- for (var _i = 0; _i < arguments.length; _i++) {
45
- args[_i] = arguments[_i];
46
- }
47
- return args.some(run);
48
- }
49
-
50
- function bindNot(fn) {
51
- return function () {
52
- var args = [];
53
- for (var _i = 0; _i < arguments.length; _i++) {
54
- args[_i] = arguments[_i];
55
- }
56
- return !fn.apply(void 0, args);
57
- };
58
- }
59
-
60
- /**
61
- * Checks that at none of the passed arguments evaluate to a truthy value.
62
- */
63
- function none() {
64
- var args = [];
65
- for (var _i = 0; _i < arguments.length; _i++) {
66
- args[_i] = arguments[_i];
67
- }
68
- return args.every(bindNot(run));
69
- }
70
-
71
- /**
72
- * Checks that at only one passed argument evaluates to a truthy value.
73
- */
74
- function one() {
75
- var args = [];
76
- for (var _i = 0; _i < arguments.length; _i++) {
77
- args[_i] = arguments[_i];
78
- }
79
- var count = 0;
80
- for (var i = 0; i < args.length; i++) {
81
- if (run(args[i])) {
82
- count++;
83
- }
84
- if (count > 1) {
85
- return false;
86
- }
87
- }
88
- return count === 1;
89
- }
90
-
91
- exports.all = all;
92
- exports.any = any;
93
- exports.none = none;
94
- exports.one = one;
@@ -1,7 +0,0 @@
1
- 'use strict'
2
-
3
- if (process.env.NODE_ENV === 'production') {
4
- module.exports = require('./anyone.production.js');
5
- } else {
6
- module.exports = require('./anyone.development.js');
7
- }
@@ -1 +0,0 @@
1
- "use strict";function r(r){if(function(r){return"function"==typeof r}(r))try{return n(r())}catch(r){return!1}return n(r)}function n(r){return!!Array.isArray(r)||0!=r&&!!r}function t(r){return function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return!r.apply(void 0,n)}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.all=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return n.every(r)},exports.any=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return n.some(r)},exports.none=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return n.every(t(r))},exports.one=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];for(var e=t=0;e<n.length;e++)if(r(n[e])&&t++,1<t)return!1;return 1===t};
@@ -1,47 +0,0 @@
1
- 'use strict';
2
-
3
- function bindNot(fn) {
4
- return function () {
5
- var args = [];
6
- for (var _i = 0; _i < arguments.length; _i++) {
7
- args[_i] = arguments[_i];
8
- }
9
- return !fn.apply(void 0, args);
10
- };
11
- }
12
-
13
- function isFunction(value) {
14
- return typeof value === 'function';
15
- }
16
-
17
- /**
18
- * Accepts a value or a function, and coerces it into a boolean value
19
- */
20
- function run(arg) {
21
- if (isFunction(arg)) {
22
- try {
23
- return check(arg());
24
- }
25
- catch (err) {
26
- return false;
27
- }
28
- }
29
- return check(arg);
30
- }
31
- function check(value) {
32
- // We use abstract equality intentionally here. This enables falsy valueOf support.
33
- return Array.isArray(value) ? true : value != false && Boolean(value); // eslint-disable-line
34
- }
35
-
36
- /**
37
- * Checks that at none of the passed arguments evaluate to a truthy value.
38
- */
39
- function none() {
40
- var args = [];
41
- for (var _i = 0; _i < arguments.length; _i++) {
42
- args[_i] = arguments[_i];
43
- }
44
- return args.every(bindNot(run));
45
- }
46
-
47
- module.exports = none;
package/dist/cjs/none.js DELETED
@@ -1,7 +0,0 @@
1
- 'use strict'
2
-
3
- if (process.env.NODE_ENV === 'production') {
4
- module.exports = require('./none.production.js');
5
- } else {
6
- module.exports = require('./none.development.js');
7
- }
@@ -1 +0,0 @@
1
- "use strict";function r(r){return function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return!r.apply(void 0,n)}}function n(r){if(function(r){return"function"==typeof r}(r))try{return t(r())}catch(r){return!1}return t(r)}function t(r){return!!Array.isArray(r)||0!=r&&!!r}module.exports=function(){for(var t=[],u=0;u<arguments.length;u++)t[u]=arguments[u];return t.every(r(n))};
@@ -1,46 +0,0 @@
1
- 'use strict';
2
-
3
- function isFunction(value) {
4
- return typeof value === 'function';
5
- }
6
-
7
- /**
8
- * Accepts a value or a function, and coerces it into a boolean value
9
- */
10
- function run(arg) {
11
- if (isFunction(arg)) {
12
- try {
13
- return check(arg());
14
- }
15
- catch (err) {
16
- return false;
17
- }
18
- }
19
- return check(arg);
20
- }
21
- function check(value) {
22
- // We use abstract equality intentionally here. This enables falsy valueOf support.
23
- return Array.isArray(value) ? true : value != false && Boolean(value); // eslint-disable-line
24
- }
25
-
26
- /**
27
- * Checks that at only one passed argument evaluates to a truthy value.
28
- */
29
- function one() {
30
- var args = [];
31
- for (var _i = 0; _i < arguments.length; _i++) {
32
- args[_i] = arguments[_i];
33
- }
34
- var count = 0;
35
- for (var i = 0; i < args.length; i++) {
36
- if (run(args[i])) {
37
- count++;
38
- }
39
- if (count > 1) {
40
- return false;
41
- }
42
- }
43
- return count === 1;
44
- }
45
-
46
- module.exports = one;
package/dist/cjs/one.js DELETED
@@ -1,7 +0,0 @@
1
- 'use strict'
2
-
3
- if (process.env.NODE_ENV === 'production') {
4
- module.exports = require('./one.production.js');
5
- } else {
6
- module.exports = require('./one.development.js');
7
- }
@@ -1 +0,0 @@
1
- "use strict";function r(r){if(function(r){return"function"==typeof r}(r))try{return t(r())}catch(r){return!1}return t(r)}function t(r){return!!Array.isArray(r)||0!=r&&!!r}module.exports=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var u=n=0;u<t.length;u++)if(r(t[u])&&n++,1<n)return!1;return 1===n};
@@ -1 +0,0 @@
1
- {"type":"commonjs"}
@@ -1,35 +0,0 @@
1
- function isFunction(value) {
2
- return typeof value === 'function';
3
- }
4
-
5
- /**
6
- * Accepts a value or a function, and coerces it into a boolean value
7
- */
8
- function run(arg) {
9
- if (isFunction(arg)) {
10
- try {
11
- return check(arg());
12
- }
13
- catch (err) {
14
- return false;
15
- }
16
- }
17
- return check(arg);
18
- }
19
- function check(value) {
20
- // We use abstract equality intentionally here. This enables falsy valueOf support.
21
- return Array.isArray(value) ? true : value != false && Boolean(value); // eslint-disable-line
22
- }
23
-
24
- /**
25
- * Checks that at all passed arguments evaluate to a truthy value.
26
- */
27
- function all() {
28
- var args = [];
29
- for (var _i = 0; _i < arguments.length; _i++) {
30
- args[_i] = arguments[_i];
31
- }
32
- return args.every(run);
33
- }
34
-
35
- export default all;
@@ -1 +0,0 @@
1
- function r(r){if("function"==typeof r)try{return t(r())}catch(r){return!1}return t(r)}function t(r){return!!Array.isArray(r)||0!=r&&!!r}export default function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.every(r)}
@@ -1,35 +0,0 @@
1
- function isFunction(value) {
2
- return typeof value === 'function';
3
- }
4
-
5
- /**
6
- * Accepts a value or a function, and coerces it into a boolean value
7
- */
8
- function run(arg) {
9
- if (isFunction(arg)) {
10
- try {
11
- return check(arg());
12
- }
13
- catch (err) {
14
- return false;
15
- }
16
- }
17
- return check(arg);
18
- }
19
- function check(value) {
20
- // We use abstract equality intentionally here. This enables falsy valueOf support.
21
- return Array.isArray(value) ? true : value != false && Boolean(value); // eslint-disable-line
22
- }
23
-
24
- /**
25
- * Checks that at least one passed argument evaluates to a truthy value.
26
- */
27
- function any() {
28
- var args = [];
29
- for (var _i = 0; _i < arguments.length; _i++) {
30
- args[_i] = arguments[_i];
31
- }
32
- return args.some(run);
33
- }
34
-
35
- export default any;
@@ -1 +0,0 @@
1
- function r(r){if("function"==typeof r)try{return t(r())}catch(r){return!1}return t(r)}function t(r){return!!Array.isArray(r)||0!=r&&!!r}export default function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.some(r)}
@@ -1,87 +0,0 @@
1
- function isFunction(value) {
2
- return typeof value === 'function';
3
- }
4
-
5
- /**
6
- * Accepts a value or a function, and coerces it into a boolean value
7
- */
8
- function run(arg) {
9
- if (isFunction(arg)) {
10
- try {
11
- return check(arg());
12
- }
13
- catch (err) {
14
- return false;
15
- }
16
- }
17
- return check(arg);
18
- }
19
- function check(value) {
20
- // We use abstract equality intentionally here. This enables falsy valueOf support.
21
- return Array.isArray(value) ? true : value != false && Boolean(value); // eslint-disable-line
22
- }
23
-
24
- /**
25
- * Checks that at all passed arguments evaluate to a truthy value.
26
- */
27
- function all() {
28
- var args = [];
29
- for (var _i = 0; _i < arguments.length; _i++) {
30
- args[_i] = arguments[_i];
31
- }
32
- return args.every(run);
33
- }
34
-
35
- /**
36
- * Checks that at least one passed argument evaluates to a truthy value.
37
- */
38
- function any() {
39
- var args = [];
40
- for (var _i = 0; _i < arguments.length; _i++) {
41
- args[_i] = arguments[_i];
42
- }
43
- return args.some(run);
44
- }
45
-
46
- function bindNot(fn) {
47
- return function () {
48
- var args = [];
49
- for (var _i = 0; _i < arguments.length; _i++) {
50
- args[_i] = arguments[_i];
51
- }
52
- return !fn.apply(void 0, args);
53
- };
54
- }
55
-
56
- /**
57
- * Checks that at none of the passed arguments evaluate to a truthy value.
58
- */
59
- function none() {
60
- var args = [];
61
- for (var _i = 0; _i < arguments.length; _i++) {
62
- args[_i] = arguments[_i];
63
- }
64
- return args.every(bindNot(run));
65
- }
66
-
67
- /**
68
- * Checks that at only one passed argument evaluates to a truthy value.
69
- */
70
- function one() {
71
- var args = [];
72
- for (var _i = 0; _i < arguments.length; _i++) {
73
- args[_i] = arguments[_i];
74
- }
75
- var count = 0;
76
- for (var i = 0; i < args.length; i++) {
77
- if (run(args[i])) {
78
- count++;
79
- }
80
- if (count > 1) {
81
- return false;
82
- }
83
- }
84
- return count === 1;
85
- }
86
-
87
- export { all, any, none, one };
@@ -1 +0,0 @@
1
- function r(r){if("function"==typeof r)try{return n(r())}catch(r){return!1}return n(r)}function n(r){return!!Array.isArray(r)||0!=r&&!!r}function t(r){return function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return!r.apply(void 0,n)}}function e(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return n.every(r)}function u(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return n.some(r)}function o(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return n.every(t(r))}function f(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];for(var e=t=0;e<n.length;e++)if(r(n[e])&&t++,1<t)return!1;return 1===t}export{e as all,u as any,o as none,f as one};