anyone 1.0.2 → 1.0.3-dev-b9b126

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 (46) hide show
  1. package/all/package.json +2 -0
  2. package/any/package.json +2 -0
  3. package/dist/cjs/all.development.js +3 -5
  4. package/dist/cjs/all.production.js +1 -1
  5. package/dist/cjs/any.development.js +3 -5
  6. package/dist/cjs/any.production.js +1 -1
  7. package/dist/cjs/anyone.development.js +4 -16
  8. package/dist/cjs/anyone.production.js +1 -1
  9. package/dist/cjs/none.development.js +4 -16
  10. package/dist/cjs/none.production.js +1 -1
  11. package/dist/cjs/one.development.js +3 -5
  12. package/dist/cjs/one.production.js +1 -1
  13. package/dist/es/all.development.js +3 -5
  14. package/dist/es/all.production.js +1 -1
  15. package/dist/es/any.development.js +3 -5
  16. package/dist/es/any.production.js +1 -1
  17. package/dist/es/anyone.development.js +2 -14
  18. package/dist/es/anyone.production.js +1 -1
  19. package/dist/es/none.development.js +3 -15
  20. package/dist/es/none.production.js +1 -1
  21. package/dist/es/one.development.js +3 -5
  22. package/dist/es/one.production.js +1 -1
  23. package/dist/umd/all.development.js +7 -11
  24. package/dist/umd/all.production.js +1 -1
  25. package/dist/umd/any.development.js +7 -11
  26. package/dist/umd/any.production.js +1 -1
  27. package/dist/umd/anyone.development.js +8 -22
  28. package/dist/umd/anyone.production.js +1 -1
  29. package/dist/umd/none.development.js +8 -22
  30. package/dist/umd/none.production.js +1 -1
  31. package/dist/umd/one.development.js +7 -11
  32. package/dist/umd/one.production.js +1 -1
  33. package/none/package.json +2 -0
  34. package/one/package.json +2 -0
  35. package/package.json +7 -2
  36. package/tsconfig.json +11 -1
  37. package/types/all.d.ts +1 -0
  38. package/types/all.d.ts.map +1 -0
  39. package/types/any.d.ts +1 -0
  40. package/types/any.d.ts.map +1 -0
  41. package/types/anyone.d.ts +1 -0
  42. package/types/anyone.d.ts.map +1 -0
  43. package/types/none.d.ts +1 -0
  44. package/types/none.d.ts.map +1 -0
  45. package/types/one.d.ts +1 -0
  46. package/types/one.d.ts.map +1 -0
package/all/package.json CHANGED
@@ -1,6 +1,8 @@
1
1
  {
2
2
  "main": "../dist/cjs/all.js",
3
3
  "module": "../dist/es/all.production.js",
4
+ "unpkg": "../dist/umd/all.production.js",
5
+ "jsdelivr": "../dist/umd/all.production.js",
4
6
  "name": "all",
5
7
  "types": "../types/all.d.ts",
6
8
  "private": true
package/any/package.json CHANGED
@@ -1,6 +1,8 @@
1
1
  {
2
2
  "main": "../dist/cjs/any.js",
3
3
  "module": "../dist/es/any.production.js",
4
+ "unpkg": "../dist/umd/any.production.js",
5
+ "jsdelivr": "../dist/umd/any.production.js",
4
6
  "name": "any",
5
7
  "types": "../types/any.d.ts",
6
8
  "private": true
@@ -1,14 +1,12 @@
1
1
  'use strict';
2
2
 
3
- function isFunction(value) {
4
- return typeof value === 'function';
5
- }
3
+ var vestUtils = require('vest-utils');
6
4
 
7
5
  /**
8
6
  * Accepts a value or a function, and coerces it into a boolean value
9
7
  */
10
8
  function run(arg) {
11
- if (isFunction(arg)) {
9
+ if (vestUtils.isFunction(arg)) {
12
10
  try {
13
11
  return check(arg());
14
12
  }
@@ -20,7 +18,7 @@ function run(arg) {
20
18
  }
21
19
  function check(value) {
22
20
  // We use abstract equality intentionally here. This enables falsy valueOf support.
23
- return Array.isArray(value) ? true : value != false && Boolean(value); // eslint-disable-line
21
+ return Array.isArray(value) ? true : value != false && Boolean(value);
24
22
  }
25
23
 
26
24
  /**
@@ -1 +1 @@
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
+ "use strict";var r=require("vest-utils");function t(t){if(r.isFunction(t))try{return e(t())}catch(r){return!1}return e(t)}function e(r){return!!Array.isArray(r)||0!=r&&Boolean(r)}module.exports=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return r.every(t)};
@@ -1,14 +1,12 @@
1
1
  'use strict';
2
2
 
3
- function isFunction(value) {
4
- return typeof value === 'function';
5
- }
3
+ var vestUtils = require('vest-utils');
6
4
 
7
5
  /**
8
6
  * Accepts a value or a function, and coerces it into a boolean value
9
7
  */
10
8
  function run(arg) {
11
- if (isFunction(arg)) {
9
+ if (vestUtils.isFunction(arg)) {
12
10
  try {
13
11
  return check(arg());
14
12
  }
@@ -20,7 +18,7 @@ function run(arg) {
20
18
  }
21
19
  function check(value) {
22
20
  // We use abstract equality intentionally here. This enables falsy valueOf support.
23
- return Array.isArray(value) ? true : value != false && Boolean(value); // eslint-disable-line
21
+ return Array.isArray(value) ? true : value != false && Boolean(value);
24
22
  }
25
23
 
26
24
  /**
@@ -1 +1 @@
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
+ "use strict";var r=require("vest-utils");function t(t){if(r.isFunction(t))try{return n(t())}catch(r){return!1}return n(t)}function n(r){return!!Array.isArray(r)||0!=r&&Boolean(r)}module.exports=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.some(t)};
@@ -2,15 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- function isFunction(value) {
6
- return typeof value === 'function';
7
- }
5
+ var vestUtils = require('vest-utils');
8
6
 
9
7
  /**
10
8
  * Accepts a value or a function, and coerces it into a boolean value
11
9
  */
12
10
  function run(arg) {
13
- if (isFunction(arg)) {
11
+ if (vestUtils.isFunction(arg)) {
14
12
  try {
15
13
  return check(arg());
16
14
  }
@@ -22,7 +20,7 @@ function run(arg) {
22
20
  }
23
21
  function check(value) {
24
22
  // We use abstract equality intentionally here. This enables falsy valueOf support.
25
- return Array.isArray(value) ? true : value != false && Boolean(value); // eslint-disable-line
23
+ return Array.isArray(value) ? true : value != false && Boolean(value);
26
24
  }
27
25
 
28
26
  /**
@@ -47,16 +45,6 @@ function any() {
47
45
  return args.some(run);
48
46
  }
49
47
 
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
48
  /**
61
49
  * Checks that at none of the passed arguments evaluate to a truthy value.
62
50
  */
@@ -65,7 +53,7 @@ function none() {
65
53
  for (var _i = 0; _i < arguments.length; _i++) {
66
54
  args[_i] = arguments[_i];
67
55
  }
68
- return args.every(bindNot(run));
56
+ return args.every(vestUtils.bindNot(run));
69
57
  }
70
58
 
71
59
  /**
@@ -1 +1 @@
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
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("vest-utils");function e(e){if(r.isFunction(e))try{return n(e())}catch(r){return!1}return n(e)}function n(r){return!!Array.isArray(r)||0!=r&&Boolean(r)}exports.all=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.every(e)},exports.any=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.some(e)},exports.none=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return n.every(r.bindNot(e))},exports.one=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];for(var t=0,o=0;o<r.length;o++)if(e(r[o])&&t++,t>1)return!1;return 1===t};
@@ -1,24 +1,12 @@
1
1
  'use strict';
2
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
- }
3
+ var vestUtils = require('vest-utils');
16
4
 
17
5
  /**
18
6
  * Accepts a value or a function, and coerces it into a boolean value
19
7
  */
20
8
  function run(arg) {
21
- if (isFunction(arg)) {
9
+ if (vestUtils.isFunction(arg)) {
22
10
  try {
23
11
  return check(arg());
24
12
  }
@@ -30,7 +18,7 @@ function run(arg) {
30
18
  }
31
19
  function check(value) {
32
20
  // We use abstract equality intentionally here. This enables falsy valueOf support.
33
- return Array.isArray(value) ? true : value != false && Boolean(value); // eslint-disable-line
21
+ return Array.isArray(value) ? true : value != false && Boolean(value);
34
22
  }
35
23
 
36
24
  /**
@@ -41,7 +29,7 @@ function none() {
41
29
  for (var _i = 0; _i < arguments.length; _i++) {
42
30
  args[_i] = arguments[_i];
43
31
  }
44
- return args.every(bindNot(run));
32
+ return args.every(vestUtils.bindNot(run));
45
33
  }
46
34
 
47
35
  module.exports = none;
@@ -1 +1 @@
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
+ "use strict";var r=require("vest-utils");function t(t){if(r.isFunction(t))try{return n(t())}catch(r){return!1}return n(t)}function n(r){return!!Array.isArray(r)||0!=r&&Boolean(r)}module.exports=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return n.every(r.bindNot(t))};
@@ -1,14 +1,12 @@
1
1
  'use strict';
2
2
 
3
- function isFunction(value) {
4
- return typeof value === 'function';
5
- }
3
+ var vestUtils = require('vest-utils');
6
4
 
7
5
  /**
8
6
  * Accepts a value or a function, and coerces it into a boolean value
9
7
  */
10
8
  function run(arg) {
11
- if (isFunction(arg)) {
9
+ if (vestUtils.isFunction(arg)) {
12
10
  try {
13
11
  return check(arg());
14
12
  }
@@ -20,7 +18,7 @@ function run(arg) {
20
18
  }
21
19
  function check(value) {
22
20
  // We use abstract equality intentionally here. This enables falsy valueOf support.
23
- return Array.isArray(value) ? true : value != false && Boolean(value); // eslint-disable-line
21
+ return Array.isArray(value) ? true : value != false && Boolean(value);
24
22
  }
25
23
 
26
24
  /**
@@ -1 +1 @@
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
+ "use strict";var r=require("vest-utils");function t(t){if(r.isFunction(t))try{return n(t())}catch(r){return!1}return n(t)}function n(r){return!!Array.isArray(r)||0!=r&&Boolean(r)}module.exports=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];for(var e=0,u=0;u<r.length;u++)if(t(r[u])&&e++,e>1)return!1;return 1===e};
@@ -1,6 +1,4 @@
1
- function isFunction(value) {
2
- return typeof value === 'function';
3
- }
1
+ import { isFunction } from 'vest-utils';
4
2
 
5
3
  /**
6
4
  * Accepts a value or a function, and coerces it into a boolean value
@@ -18,7 +16,7 @@ function run(arg) {
18
16
  }
19
17
  function check(value) {
20
18
  // We use abstract equality intentionally here. This enables falsy valueOf support.
21
- return Array.isArray(value) ? true : value != false && Boolean(value); // eslint-disable-line
19
+ return Array.isArray(value) ? true : value != false && Boolean(value);
22
20
  }
23
21
 
24
22
  /**
@@ -32,4 +30,4 @@ function all() {
32
30
  return args.every(run);
33
31
  }
34
32
 
35
- export default all;
33
+ export { all as default };
@@ -1 +1 @@
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
+ import{isFunction as r}from"vest-utils";function t(t){if(r(t))try{return n(t())}catch(r){return!1}return n(t)}function n(r){return!!Array.isArray(r)||0!=r&&Boolean(r)}function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.every(t)}export{e as default};
@@ -1,6 +1,4 @@
1
- function isFunction(value) {
2
- return typeof value === 'function';
3
- }
1
+ import { isFunction } from 'vest-utils';
4
2
 
5
3
  /**
6
4
  * Accepts a value or a function, and coerces it into a boolean value
@@ -18,7 +16,7 @@ function run(arg) {
18
16
  }
19
17
  function check(value) {
20
18
  // We use abstract equality intentionally here. This enables falsy valueOf support.
21
- return Array.isArray(value) ? true : value != false && Boolean(value); // eslint-disable-line
19
+ return Array.isArray(value) ? true : value != false && Boolean(value);
22
20
  }
23
21
 
24
22
  /**
@@ -32,4 +30,4 @@ function any() {
32
30
  return args.some(run);
33
31
  }
34
32
 
35
- export default any;
33
+ export { any as default };
@@ -1 +1 @@
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
+ import{isFunction as r}from"vest-utils";function t(t){if(r(t))try{return n(t())}catch(r){return!1}return n(t)}function n(r){return!!Array.isArray(r)||0!=r&&Boolean(r)}function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.some(t)}export{e as default};
@@ -1,6 +1,4 @@
1
- function isFunction(value) {
2
- return typeof value === 'function';
3
- }
1
+ import { isFunction, bindNot } from 'vest-utils';
4
2
 
5
3
  /**
6
4
  * Accepts a value or a function, and coerces it into a boolean value
@@ -18,7 +16,7 @@ function run(arg) {
18
16
  }
19
17
  function check(value) {
20
18
  // We use abstract equality intentionally here. This enables falsy valueOf support.
21
- return Array.isArray(value) ? true : value != false && Boolean(value); // eslint-disable-line
19
+ return Array.isArray(value) ? true : value != false && Boolean(value);
22
20
  }
23
21
 
24
22
  /**
@@ -43,16 +41,6 @@ function any() {
43
41
  return args.some(run);
44
42
  }
45
43
 
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
44
  /**
57
45
  * Checks that at none of the passed arguments evaluate to a truthy value.
58
46
  */
@@ -1 +1 @@
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};
1
+ import{isFunction as r,bindNot as n}from"vest-utils";function t(n){if(r(n))try{return e(n())}catch(r){return!1}return e(n)}function e(r){return!!Array.isArray(r)||0!=r&&Boolean(r)}function o(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.every(t)}function u(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.some(t)}function f(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return r.every(n(t))}function i(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];for(var e=0,o=0;o<r.length;o++)if(t(r[o])&&e++,e>1)return!1;return 1===e}export{o as all,u as any,f as none,i as one};
@@ -1,16 +1,4 @@
1
- function bindNot(fn) {
2
- return function () {
3
- var args = [];
4
- for (var _i = 0; _i < arguments.length; _i++) {
5
- args[_i] = arguments[_i];
6
- }
7
- return !fn.apply(void 0, args);
8
- };
9
- }
10
-
11
- function isFunction(value) {
12
- return typeof value === 'function';
13
- }
1
+ import { isFunction, bindNot } from 'vest-utils';
14
2
 
15
3
  /**
16
4
  * Accepts a value or a function, and coerces it into a boolean value
@@ -28,7 +16,7 @@ function run(arg) {
28
16
  }
29
17
  function check(value) {
30
18
  // We use abstract equality intentionally here. This enables falsy valueOf support.
31
- return Array.isArray(value) ? true : value != false && Boolean(value); // eslint-disable-line
19
+ return Array.isArray(value) ? true : value != false && Boolean(value);
32
20
  }
33
21
 
34
22
  /**
@@ -42,4 +30,4 @@ function none() {
42
30
  return args.every(bindNot(run));
43
31
  }
44
32
 
45
- export default none;
33
+ export { none as default };
@@ -1 +1 @@
1
- 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"==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=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.every(r(n))}
1
+ import{isFunction as r,bindNot as t}from"vest-utils";function n(t){if(r(t))try{return e(t())}catch(r){return!1}return e(t)}function e(r){return!!Array.isArray(r)||0!=r&&Boolean(r)}function u(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return r.every(t(n))}export{u as default};
@@ -1,6 +1,4 @@
1
- function isFunction(value) {
2
- return typeof value === 'function';
3
- }
1
+ import { isFunction } from 'vest-utils';
4
2
 
5
3
  /**
6
4
  * Accepts a value or a function, and coerces it into a boolean value
@@ -18,7 +16,7 @@ function run(arg) {
18
16
  }
19
17
  function check(value) {
20
18
  // We use abstract equality intentionally here. This enables falsy valueOf support.
21
- return Array.isArray(value) ? true : value != false && Boolean(value); // eslint-disable-line
19
+ return Array.isArray(value) ? true : value != false && Boolean(value);
22
20
  }
23
21
 
24
22
  /**
@@ -41,4 +39,4 @@ function one() {
41
39
  return count === 1;
42
40
  }
43
41
 
44
- export default one;
42
+ export { one as default };
@@ -1 +1 @@
1
- function r(r){return!!Array.isArray(r)||0!=r&&!!r}export default function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var a=n=0;a<t.length;a++){r:{var e=t[a];if("function"==typeof e)try{var f=r(e());break r}catch(r){f=!1;break r}f=r(e)}if(f&&n++,1<n)return!1}return 1===n}
1
+ import{isFunction as r}from"vest-utils";function t(t){if(r(t))try{return n(t())}catch(r){return!1}return n(t)}function n(r){return!!Array.isArray(r)||0!=r&&Boolean(r)}function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];for(var e=0,u=0;u<r.length;u++)if(t(r[u])&&e++,e>1)return!1;return 1===e}export{e as default};
@@ -1,18 +1,14 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3
- typeof define === 'function' && define.amd ? define(factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.all = factory());
5
- }(this, (function () { 'use strict';
6
-
7
- function isFunction(value) {
8
- return typeof value === 'function';
9
- }
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('vest-utils')) :
3
+ typeof define === 'function' && define.amd ? define(['vest-utils'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.all = factory(global["vest-utils"]));
5
+ })(this, (function (vestUtils) { 'use strict';
10
6
 
11
7
  /**
12
8
  * Accepts a value or a function, and coerces it into a boolean value
13
9
  */
14
10
  function run(arg) {
15
- if (isFunction(arg)) {
11
+ if (vestUtils.isFunction(arg)) {
16
12
  try {
17
13
  return check(arg());
18
14
  }
@@ -24,7 +20,7 @@
24
20
  }
25
21
  function check(value) {
26
22
  // We use abstract equality intentionally here. This enables falsy valueOf support.
27
- return Array.isArray(value) ? true : value != false && Boolean(value); // eslint-disable-line
23
+ return Array.isArray(value) ? true : value != false && Boolean(value);
28
24
  }
29
25
 
30
26
  /**
@@ -40,4 +36,4 @@
40
36
 
41
37
  return all;
42
38
 
43
- })));
39
+ }));
@@ -1 +1 @@
1
- "use strict";!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).all=n()}(this,(function(){function e(e){if("function"==typeof e)try{return n(e())}catch(e){return!1}return n(e)}function n(e){return!!Array.isArray(e)||0!=e&&!!e}return function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return n.every(e)}}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vest-utils")):"function"==typeof define&&define.amd?define(["vest-utils"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).all=t(e["vest-utils"])}(this,(function(e){"use strict";function t(t){if(e.isFunction(t))try{return n(t())}catch(e){return!1}return n(t)}function n(e){return!!Array.isArray(e)||0!=e&&Boolean(e)}return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.every(t)}}));
@@ -1,18 +1,14 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3
- typeof define === 'function' && define.amd ? define(factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.any = factory());
5
- }(this, (function () { 'use strict';
6
-
7
- function isFunction(value) {
8
- return typeof value === 'function';
9
- }
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('vest-utils')) :
3
+ typeof define === 'function' && define.amd ? define(['vest-utils'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.any = factory(global["vest-utils"]));
5
+ })(this, (function (vestUtils) { 'use strict';
10
6
 
11
7
  /**
12
8
  * Accepts a value or a function, and coerces it into a boolean value
13
9
  */
14
10
  function run(arg) {
15
- if (isFunction(arg)) {
11
+ if (vestUtils.isFunction(arg)) {
16
12
  try {
17
13
  return check(arg());
18
14
  }
@@ -24,7 +20,7 @@
24
20
  }
25
21
  function check(value) {
26
22
  // We use abstract equality intentionally here. This enables falsy valueOf support.
27
- return Array.isArray(value) ? true : value != false && Boolean(value); // eslint-disable-line
23
+ return Array.isArray(value) ? true : value != false && Boolean(value);
28
24
  }
29
25
 
30
26
  /**
@@ -40,4 +36,4 @@
40
36
 
41
37
  return any;
42
38
 
43
- })));
39
+ }));
@@ -1 +1 @@
1
- "use strict";!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).any=n()}(this,(function(){function e(e){if("function"==typeof e)try{return n(e())}catch(e){return!1}return n(e)}function n(e){return!!Array.isArray(e)||0!=e&&!!e}return function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return n.some(e)}}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vest-utils")):"function"==typeof define&&define.amd?define(["vest-utils"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).any=t(e["vest-utils"])}(this,(function(e){"use strict";function t(t){if(e.isFunction(t))try{return n(t())}catch(e){return!1}return n(t)}function n(e){return!!Array.isArray(e)||0!=e&&Boolean(e)}return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.some(t)}}));
@@ -1,18 +1,14 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
- typeof define === 'function' && define.amd ? define(['exports'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.anyone = {}));
5
- }(this, (function (exports) { 'use strict';
6
-
7
- function isFunction(value) {
8
- return typeof value === 'function';
9
- }
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vest-utils')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'vest-utils'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.anyone = {}, global["vest-utils"]));
5
+ })(this, (function (exports, vestUtils) { 'use strict';
10
6
 
11
7
  /**
12
8
  * Accepts a value or a function, and coerces it into a boolean value
13
9
  */
14
10
  function run(arg) {
15
- if (isFunction(arg)) {
11
+ if (vestUtils.isFunction(arg)) {
16
12
  try {
17
13
  return check(arg());
18
14
  }
@@ -24,7 +20,7 @@
24
20
  }
25
21
  function check(value) {
26
22
  // We use abstract equality intentionally here. This enables falsy valueOf support.
27
- return Array.isArray(value) ? true : value != false && Boolean(value); // eslint-disable-line
23
+ return Array.isArray(value) ? true : value != false && Boolean(value);
28
24
  }
29
25
 
30
26
  /**
@@ -49,16 +45,6 @@
49
45
  return args.some(run);
50
46
  }
51
47
 
52
- function bindNot(fn) {
53
- return function () {
54
- var args = [];
55
- for (var _i = 0; _i < arguments.length; _i++) {
56
- args[_i] = arguments[_i];
57
- }
58
- return !fn.apply(void 0, args);
59
- };
60
- }
61
-
62
48
  /**
63
49
  * Checks that at none of the passed arguments evaluate to a truthy value.
64
50
  */
@@ -67,7 +53,7 @@
67
53
  for (var _i = 0; _i < arguments.length; _i++) {
68
54
  args[_i] = arguments[_i];
69
55
  }
70
- return args.every(bindNot(run));
56
+ return args.every(vestUtils.bindNot(run));
71
57
  }
72
58
 
73
59
  /**
@@ -97,4 +83,4 @@
97
83
 
98
84
  Object.defineProperty(exports, '__esModule', { value: true });
99
85
 
100
- })));
86
+ }));
@@ -1 +1 @@
1
- "use strict";!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((n="undefined"!=typeof globalThis?globalThis:n||self).anyone={})}(this,(function(n){function e(n){if("function"==typeof n)try{return r(n())}catch(n){return!1}return r(n)}function r(n){return!!Array.isArray(n)||0!=n&&!!n}function t(n){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return!n.apply(void 0,e)}}n.all=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.every(e)},n.any=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.some(e)},n.none=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.every(t(e))},n.one=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];for(var t=r=0;t<n.length;t++)if(e(n[t])&&r++,1<r)return!1;return 1===r},Object.defineProperty(n,"__esModule",{value:!0})}));
1
+ !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("vest-utils")):"function"==typeof define&&define.amd?define(["exports","vest-utils"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).anyone={},e["vest-utils"])}(this,(function(e,n){"use strict";function t(e){if(n.isFunction(e))try{return r(e())}catch(e){return!1}return r(e)}function r(e){return!!Array.isArray(e)||0!=e&&Boolean(e)}e.all=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.every(t)},e.any=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.some(t)},e.none=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return e.every(n.bindNot(t))},e.one=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];for(var r=0,o=0;o<e.length;o++)if(t(e[o])&&r++,r>1)return!1;return 1===r},Object.defineProperty(e,"__esModule",{value:!0})}));
@@ -1,28 +1,14 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3
- typeof define === 'function' && define.amd ? define(factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.none = factory());
5
- }(this, (function () { 'use strict';
6
-
7
- function bindNot(fn) {
8
- return function () {
9
- var args = [];
10
- for (var _i = 0; _i < arguments.length; _i++) {
11
- args[_i] = arguments[_i];
12
- }
13
- return !fn.apply(void 0, args);
14
- };
15
- }
16
-
17
- function isFunction(value) {
18
- return typeof value === 'function';
19
- }
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('vest-utils')) :
3
+ typeof define === 'function' && define.amd ? define(['vest-utils'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.none = factory(global["vest-utils"]));
5
+ })(this, (function (vestUtils) { 'use strict';
20
6
 
21
7
  /**
22
8
  * Accepts a value or a function, and coerces it into a boolean value
23
9
  */
24
10
  function run(arg) {
25
- if (isFunction(arg)) {
11
+ if (vestUtils.isFunction(arg)) {
26
12
  try {
27
13
  return check(arg());
28
14
  }
@@ -34,7 +20,7 @@
34
20
  }
35
21
  function check(value) {
36
22
  // We use abstract equality intentionally here. This enables falsy valueOf support.
37
- return Array.isArray(value) ? true : value != false && Boolean(value); // eslint-disable-line
23
+ return Array.isArray(value) ? true : value != false && Boolean(value);
38
24
  }
39
25
 
40
26
  /**
@@ -45,9 +31,9 @@
45
31
  for (var _i = 0; _i < arguments.length; _i++) {
46
32
  args[_i] = arguments[_i];
47
33
  }
48
- return args.every(bindNot(run));
34
+ return args.every(vestUtils.bindNot(run));
49
35
  }
50
36
 
51
37
  return none;
52
38
 
53
- })));
39
+ }));
@@ -1 +1 @@
1
- "use strict";!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(n="undefined"!=typeof globalThis?globalThis:n||self).none=e()}(this,(function(){function n(n){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return!n.apply(void 0,e)}}function e(n){if("function"==typeof n)try{return t(n())}catch(n){return!1}return t(n)}function t(n){return!!Array.isArray(n)||0!=n&&!!n}return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return t.every(n(e))}}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vest-utils")):"function"==typeof define&&define.amd?define(["vest-utils"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).none=t(e["vest-utils"])}(this,(function(e){"use strict";function t(t){if(e.isFunction(t))try{return n(t())}catch(e){return!1}return n(t)}function n(e){return!!Array.isArray(e)||0!=e&&Boolean(e)}return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.every(e.bindNot(t))}}));
@@ -1,18 +1,14 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3
- typeof define === 'function' && define.amd ? define(factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.one = factory());
5
- }(this, (function () { 'use strict';
6
-
7
- function isFunction(value) {
8
- return typeof value === 'function';
9
- }
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('vest-utils')) :
3
+ typeof define === 'function' && define.amd ? define(['vest-utils'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.one = factory(global["vest-utils"]));
5
+ })(this, (function (vestUtils) { 'use strict';
10
6
 
11
7
  /**
12
8
  * Accepts a value or a function, and coerces it into a boolean value
13
9
  */
14
10
  function run(arg) {
15
- if (isFunction(arg)) {
11
+ if (vestUtils.isFunction(arg)) {
16
12
  try {
17
13
  return check(arg());
18
14
  }
@@ -24,7 +20,7 @@
24
20
  }
25
21
  function check(value) {
26
22
  // We use abstract equality intentionally here. This enables falsy valueOf support.
27
- return Array.isArray(value) ? true : value != false && Boolean(value); // eslint-disable-line
23
+ return Array.isArray(value) ? true : value != false && Boolean(value);
28
24
  }
29
25
 
30
26
  /**
@@ -49,4 +45,4 @@
49
45
 
50
46
  return one;
51
47
 
52
- })));
48
+ }));
@@ -1 +1 @@
1
- "use strict";!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).one=n()}(this,(function(){function e(e){return!!Array.isArray(e)||0!=e&&!!e}return function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];for(var r=t=0;r<n.length;r++){e:{var f=n[r];if("function"==typeof f)try{var o=e(f());break e}catch(e){o=!1;break e}o=e(f)}if(o&&t++,1<t)return!1}return 1===t}}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vest-utils")):"function"==typeof define&&define.amd?define(["vest-utils"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).one=t(e["vest-utils"])}(this,(function(e){"use strict";function t(t){if(e.isFunction(t))try{return n(t())}catch(e){return!1}return n(t)}function n(e){return!!Array.isArray(e)||0!=e&&Boolean(e)}return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];for(var r=0,i=0;i<e.length;i++)if(t(e[i])&&r++,r>1)return!1;return 1===r}}));
package/none/package.json CHANGED
@@ -1,6 +1,8 @@
1
1
  {
2
2
  "main": "../dist/cjs/none.js",
3
3
  "module": "../dist/es/none.production.js",
4
+ "unpkg": "../dist/umd/none.production.js",
5
+ "jsdelivr": "../dist/umd/none.production.js",
4
6
  "name": "none",
5
7
  "types": "../types/none.d.ts",
6
8
  "private": true
package/one/package.json CHANGED
@@ -1,6 +1,8 @@
1
1
  {
2
2
  "main": "../dist/cjs/one.js",
3
3
  "module": "../dist/es/one.production.js",
4
+ "unpkg": "../dist/umd/one.production.js",
5
+ "jsdelivr": "../dist/umd/one.production.js",
4
6
  "name": "one",
5
7
  "types": "../types/one.d.ts",
6
8
  "private": true
package/package.json CHANGED
@@ -3,13 +3,16 @@
3
3
  "license": "MIT",
4
4
  "main": "./dist/cjs/anyone.js",
5
5
  "types": "./types/anyone.d.ts",
6
- "version": "1.0.2",
6
+ "version": "1.0.3-dev-b9b126",
7
7
  "author": "ealush",
8
8
  "scripts": {
9
9
  "test": "vx test",
10
10
  "build": "vx build",
11
11
  "release": "vx release"
12
12
  },
13
+ "dependencies": {
14
+ "vest-utils": "^0.0.2"
15
+ },
13
16
  "module": "./dist/es/anyone.production.js",
14
17
  "exports": {
15
18
  "./all": {
@@ -162,5 +165,7 @@
162
165
  },
163
166
  "bugs": {
164
167
  "url": "https://github.com/ealush/vest.git/issues"
165
- }
168
+ },
169
+ "unpkg": "./dist/umd/anyone.production.js",
170
+ "jsdelivr": "./dist/umd/anyone.production.js"
166
171
  }
package/tsconfig.json CHANGED
@@ -1,8 +1,18 @@
1
1
  {
2
2
  "extends": "../../tsconfig.json",
3
+ "rootDir": ".",
3
4
  "compilerOptions": {
5
+ "baseUrl": ".",
4
6
  "declarationMap": true,
5
7
  "declarationDir": "./types",
6
- "outDir": "./dist"
8
+ "outDir": "./dist",
9
+ "paths": {
10
+ "anyone": ["src/anyone.ts"],
11
+ "all": ["src/exports/all.ts"],
12
+ "any": ["src/exports/any.ts"],
13
+ "none": ["src/exports/none.ts"],
14
+ "one": ["src/exports/one.ts"],
15
+ "runAnyoneMethods": ["src/runner/runAnyoneMethods.ts"]
16
+ }
7
17
  }
8
18
  }
package/types/all.d.ts CHANGED
@@ -3,3 +3,4 @@
3
3
  */
4
4
  declare function all(...args: unknown[]): boolean;
5
5
  export { all as default };
6
+ //# sourceMappingURL=all.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"all.d.ts","sourceRoot":"","sources":["../src/exports/all.ts","../src/runner/runAnyoneMethods.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,iBAAwB,GAAG,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAEvD"}
package/types/any.d.ts CHANGED
@@ -3,3 +3,4 @@
3
3
  */
4
4
  declare function any(...args: unknown[]): boolean;
5
5
  export { any as default };
6
+ //# sourceMappingURL=any.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"any.d.ts","sourceRoot":"","sources":["../src/exports/any.ts","../src/runner/runAnyoneMethods.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,iBAAwB,GAAG,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAEvD"}
package/types/anyone.d.ts CHANGED
@@ -15,3 +15,4 @@ declare function none(...args: unknown[]): boolean;
15
15
  */
16
16
  declare function one(...args: unknown[]): boolean;
17
17
  export { all, any, none, one };
18
+ //# sourceMappingURL=anyone.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"anyone.d.ts","sourceRoot":"","sources":["../src/anyone.ts","../src/runner/runAnyoneMethods.ts","../src/exports/all.ts","../src/exports/any.ts","../src/exports/none.ts","../src/exports/one.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,OAAO,uBAAkB,CAAY"}
package/types/none.d.ts CHANGED
@@ -3,3 +3,4 @@
3
3
  */
4
4
  declare function none(...args: unknown[]): boolean;
5
5
  export { none as default };
6
+ //# sourceMappingURL=none.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"none.d.ts","sourceRoot":"","sources":["../src/exports/none.ts","../src/runner/runAnyoneMethods.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,iBAAwB,IAAI,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAExD"}
package/types/one.d.ts CHANGED
@@ -3,3 +3,4 @@
3
3
  */
4
4
  declare function one(...args: unknown[]): boolean;
5
5
  export { one as default };
6
+ //# sourceMappingURL=one.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"one.d.ts","sourceRoot":"","sources":["../src/exports/one.ts","../src/runner/runAnyoneMethods.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,iBAAwB,GAAG,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAcvD"}