anyone 1.0.2-dev-9b46fb → 1.0.3-dev-b07a89

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 (42) hide show
  1. package/dist/cjs/all.development.js +3 -5
  2. package/dist/cjs/all.production.js +1 -1
  3. package/dist/cjs/any.development.js +3 -5
  4. package/dist/cjs/any.production.js +1 -1
  5. package/dist/cjs/anyone.development.js +4 -16
  6. package/dist/cjs/anyone.production.js +1 -1
  7. package/dist/cjs/none.development.js +4 -16
  8. package/dist/cjs/none.production.js +1 -1
  9. package/dist/cjs/one.development.js +3 -5
  10. package/dist/cjs/one.production.js +1 -1
  11. package/dist/es/all.development.js +2 -4
  12. package/dist/es/all.production.js +1 -1
  13. package/dist/es/any.development.js +2 -4
  14. package/dist/es/any.production.js +1 -1
  15. package/dist/es/anyone.development.js +2 -14
  16. package/dist/es/anyone.production.js +1 -1
  17. package/dist/es/none.development.js +2 -14
  18. package/dist/es/none.production.js +1 -1
  19. package/dist/es/one.development.js +2 -4
  20. package/dist/es/one.production.js +1 -1
  21. package/dist/umd/all.development.js +6 -10
  22. package/dist/umd/all.production.js +1 -1
  23. package/dist/umd/any.development.js +6 -10
  24. package/dist/umd/any.production.js +1 -1
  25. package/dist/umd/anyone.development.js +7 -21
  26. package/dist/umd/anyone.production.js +1 -1
  27. package/dist/umd/none.development.js +7 -21
  28. package/dist/umd/none.production.js +1 -1
  29. package/dist/umd/one.development.js +6 -10
  30. package/dist/umd/one.production.js +1 -1
  31. package/package.json +4 -1
  32. package/tsconfig.json +11 -1
  33. package/types/all.d.ts +1 -0
  34. package/types/all.d.ts.map +1 -0
  35. package/types/any.d.ts +1 -0
  36. package/types/any.d.ts.map +1 -0
  37. package/types/anyone.d.ts +1 -0
  38. package/types/anyone.d.ts.map +1 -0
  39. package/types/none.d.ts +1 -0
  40. package/types/none.d.ts.map +1 -0
  41. package/types/one.d.ts +1 -0
  42. package/types/one.d.ts.map +1 -0
@@ -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&&!!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&&!!r}module.exports=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.some(t)};
@@ -2,25 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- function bindNot(fn) {
6
- return function () {
7
- var args = [];
8
- for (var _i = 0; _i < arguments.length; _i++) {
9
- args[_i] = arguments[_i];
10
- }
11
- return !fn.apply(void 0, args);
12
- };
13
- }
14
-
15
- function isFunction(value) {
16
- return typeof value === 'function';
17
- }
5
+ var vestUtils = require('vest-utils');
18
6
 
19
7
  /**
20
8
  * Accepts a value or a function, and coerces it into a boolean value
21
9
  */
22
10
  function run(arg) {
23
- if (isFunction(arg)) {
11
+ if (vestUtils.isFunction(arg)) {
24
12
  try {
25
13
  return check(arg());
26
14
  }
@@ -32,7 +20,7 @@ function run(arg) {
32
20
  }
33
21
  function check(value) {
34
22
  // We use abstract equality intentionally here. This enables falsy valueOf support.
35
- return Array.isArray(value) ? true : value != false && Boolean(value); // eslint-disable-line
23
+ return Array.isArray(value) ? true : value != false && Boolean(value);
36
24
  }
37
25
 
38
26
  /**
@@ -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){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}Object.defineProperty(exports,"__esModule",{value:!0}),exports.all=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return r.every(n)},exports.any=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return r.some(n)},exports.none=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.every(r(n))},exports.one=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];for(var e=t=0;e<r.length;e++)if(n(r[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 t(e())}catch(r){return!1}return t(e)}function t(r){return!!Array.isArray(r)||0!=r&&!!r}exports.all=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return r.every(e)},exports.any=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return r.some(e)},exports.none=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.every(r.bindNot(e))},exports.one=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];for(var n=t=0;n<r.length;n++)if(e(r[n])&&t++,1<t)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&&!!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&&!!r}module.exports=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];for(var e=n=0;e<r.length;e++)if(t(r[e])&&n++,1<n)return!1;return 1===n};
@@ -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
  /**
@@ -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&&!!r}export default function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.every(t)}
@@ -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
  /**
@@ -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&&!!r}export default function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.some(t)}
@@ -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
  /**
@@ -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}function e(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return r.every(n)}function u(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return r.some(n)}function o(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.every(r(n))}function f(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];for(var e=t=0;e<r.length;e++)if(n(r[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&&!!r}function u(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.every(t)}function o(){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=n=0;e<r.length;e++)if(t(r[e])&&n++,1<n)return!1;return 1===n}export{u as all,o 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
  /**
@@ -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&&!!r}export default function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return r.every(t(n))}
@@ -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
  /**
@@ -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(r){return!!Array.isArray(r)||0!=r&&!!r}export default function(){for(var a=[],e=0;e<arguments.length;e++)a[e]=arguments[e];for(var n=e=0;n<a.length;n++){r:{var f=a[n];if(r(f))try{var i=t(f());break r}catch(r){i=!1;break r}i=t(f)}if(i&&e++,1<e)return!1}return 1===e}
@@ -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
  /**
@@ -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
+ "use strict";!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){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&&!!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
  /**
@@ -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
+ "use strict";!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){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&&!!e}return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.some(t)}}));
@@ -1,28 +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 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' ? 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';
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
  /**
@@ -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
  /**
@@ -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){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return!n.apply(void 0,e)}}function r(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}n.all=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return n.every(r)},n.any=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return n.some(r)},n.none=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return n.every(e(r))},n.one=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];for(var t=e=0;t<n.length;t++)if(r(n[t])&&e++,1<e)return!1;return 1===e},Object.defineProperty(n,"__esModule",{value:!0})}));
1
+ "use strict";!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){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&&!!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=n=0;r<e.length;r++)if(t(e[r])&&n++,1<n)return!1;return 1===n},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,7 +31,7 @@
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;
@@ -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
+ "use strict";!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){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&&!!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
  /**
@@ -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
+ "use strict";!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){function t(e){return!!Array.isArray(e)||0!=e&&!!e}return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];for(var i=r=0;i<n.length;i++){e:{var o=n[i];if(e.isFunction(o))try{var f=t(o());break e}catch(e){f=!1;break e}f=t(o)}if(f&&r++,1<r)return!1}return 1===r}}));
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-dev-9b46fb",
6
+ "version": "1.0.3-dev-b07a89",
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": {
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"}