@dbmx/toasts 0.0.88 → 0.0.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/components/SdmxDatagrid/utils/index.cjs +9 -7
- package/cjs/{index-IlPWvcP8.js → index-KfYx_fhj.js} +24 -24
- package/cjs/index.cjs +1 -1
- package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/concat.cjs +69 -0
- package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/equals.cjs +42 -0
- package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/filter.cjs +63 -0
- package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_arrayFromIterator.cjs +13 -0
- package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_complement.cjs +10 -0
- package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_equals.cjs +143 -0
- package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_filter.cjs +17 -0
- package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_functionName.cjs +10 -0
- package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_includes.cjs +11 -0
- package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_includesWith.cjs +16 -0
- package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_indexOf.cjs +61 -0
- package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_isFunction.cjs +9 -0
- package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_isObject.cjs +8 -0
- package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_objectIs.cjs +18 -0
- package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_quote.cjs +10 -0
- package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_toISOString.cjs +17 -0
- package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_toString.cjs +62 -0
- package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/internal/_xfilter.cjs +26 -0
- package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/reject.cjs +43 -0
- package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/times.cjs +49 -0
- package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/toString.cjs +53 -0
- package/cjs/node_modules/@dbmx/sdmx/cjs/node_modules/ramda/es/type.cjs +41 -0
- package/esm/index-FCPRKLj2.js +720 -0
- package/esm/index-FCPRKLj2.js.map +1 -0
- package/esm/index-Mh78z9aW.js +562 -0
- package/esm/index-Mh78z9aW.js.map +1 -0
- package/esm/index-T2bcfyHI.js +8510 -0
- package/esm/index-T2bcfyHI.js.map +1 -0
- package/esm/index-W7MLRHBf.js +87 -0
- package/esm/index-W7MLRHBf.js.map +1 -0
- package/esm/index-gBe37Ynf.js +8438 -0
- package/esm/index-gBe37Ynf.js.map +1 -0
- package/esm/index-ndYjFD6I.js +8438 -0
- package/esm/index-ndYjFD6I.js.map +1 -0
- package/esm/{index-kSxvArVu.js → index-yhLCk6qZ.js} +25 -25
- package/esm/index-yhLCk6qZ.js.map +1 -0
- package/esm/index.js +1 -1
- package/package.json +3 -3
- package/rollup_stats/sunburst_stats.html +1 -3
- package/rollup_stats/treemap_stats.html +1 -1
- package/cjs/fake-ZW05emqw.js +0 -35
- package/cjs/fake-ZW05emqw.js.map +0 -1
- package/cjs/index.cjs.map +0 -1
- package/esm/fake-JHdVf8lQ.js +0 -14
- package/esm/fake-JHdVf8lQ.js.map +0 -1
- package/esm/index-kSxvArVu.js.map +0 -1
- package/esm/index-lo-MKsEb.js +0 -556
- package/esm/index-lo-MKsEb.js.map +0 -1
- package/yarn-error.log +0 -7136
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var equals$1 = require('../equals.cjs');
|
|
4
|
+
|
|
5
|
+
var equals = equals$1.equals_1;
|
|
6
|
+
function _indexOf(list, a, idx) {
|
|
7
|
+
var inf, item; // Array.prototype.indexOf doesn't exist below IE9
|
|
8
|
+
|
|
9
|
+
if (typeof list.indexOf === 'function') {
|
|
10
|
+
switch (typeof a) {
|
|
11
|
+
case 'number':
|
|
12
|
+
if (a === 0) {
|
|
13
|
+
// manually crawl the list to distinguish between +0 and -0
|
|
14
|
+
inf = 1 / a;
|
|
15
|
+
while (idx < list.length) {
|
|
16
|
+
item = list[idx];
|
|
17
|
+
if (item === 0 && 1 / item === inf) {
|
|
18
|
+
return idx;
|
|
19
|
+
}
|
|
20
|
+
idx += 1;
|
|
21
|
+
}
|
|
22
|
+
return -1;
|
|
23
|
+
} else if (a !== a) {
|
|
24
|
+
// NaN
|
|
25
|
+
while (idx < list.length) {
|
|
26
|
+
item = list[idx];
|
|
27
|
+
if (typeof item === 'number' && item !== item) {
|
|
28
|
+
return idx;
|
|
29
|
+
}
|
|
30
|
+
idx += 1;
|
|
31
|
+
}
|
|
32
|
+
return -1;
|
|
33
|
+
} // non-zero numbers can utilise Set
|
|
34
|
+
|
|
35
|
+
return list.indexOf(a, idx);
|
|
36
|
+
// all these types can utilise Set
|
|
37
|
+
|
|
38
|
+
case 'string':
|
|
39
|
+
case 'boolean':
|
|
40
|
+
case 'function':
|
|
41
|
+
case 'undefined':
|
|
42
|
+
return list.indexOf(a, idx);
|
|
43
|
+
case 'object':
|
|
44
|
+
if (a === null) {
|
|
45
|
+
// null can utilise Set
|
|
46
|
+
return list.indexOf(a, idx);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
} // anything else not covered above, defer to R.equals
|
|
50
|
+
|
|
51
|
+
while (idx < list.length) {
|
|
52
|
+
if (equals(list[idx], a)) {
|
|
53
|
+
return idx;
|
|
54
|
+
}
|
|
55
|
+
idx += 1;
|
|
56
|
+
}
|
|
57
|
+
return -1;
|
|
58
|
+
}
|
|
59
|
+
var _indexOf_1 = _indexOf;
|
|
60
|
+
|
|
61
|
+
exports._indexOf_1 = _indexOf_1;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function _isFunction(x) {
|
|
4
|
+
var type = Object.prototype.toString.call(x);
|
|
5
|
+
return type === '[object Function]' || type === '[object AsyncFunction]' || type === '[object GeneratorFunction]' || type === '[object AsyncGeneratorFunction]';
|
|
6
|
+
}
|
|
7
|
+
var _isFunction_1 = _isFunction;
|
|
8
|
+
|
|
9
|
+
exports._isFunction_1 = _isFunction_1;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
4
|
+
function _objectIs(a, b) {
|
|
5
|
+
// SameValue algorithm
|
|
6
|
+
if (a === b) {
|
|
7
|
+
// Steps 1-5, 7-10
|
|
8
|
+
// Steps 6.b-6.e: +0 != -0
|
|
9
|
+
return a !== 0 || 1 / a === 1 / b;
|
|
10
|
+
} else {
|
|
11
|
+
// Step 6.a: NaN == NaN
|
|
12
|
+
return a !== a && b !== b;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
var _objectIs$1 = typeof Object.is === 'function' ? Object.is : _objectIs;
|
|
16
|
+
var _objectIs_1 = _objectIs$1;
|
|
17
|
+
|
|
18
|
+
exports._objectIs_1 = _objectIs_1;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function _quote(s) {
|
|
4
|
+
var escaped = s.replace(/\\/g, '\\\\').replace(/[\b]/g, '\\b') // \b matches word boundary; [\b] matches backspace
|
|
5
|
+
.replace(/\f/g, '\\f').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\t/g, '\\t').replace(/\v/g, '\\v').replace(/\0/g, '\\0');
|
|
6
|
+
return '"' + escaped.replace(/"/g, '\\"') + '"';
|
|
7
|
+
}
|
|
8
|
+
var _quote_1 = _quote;
|
|
9
|
+
|
|
10
|
+
exports._quote_1 = _quote_1;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Polyfill from <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString>.
|
|
5
|
+
*/
|
|
6
|
+
var pad = function pad(n) {
|
|
7
|
+
return (n < 10 ? '0' : '') + n;
|
|
8
|
+
};
|
|
9
|
+
var _toISOString = typeof Date.prototype.toISOString === 'function' ? function _toISOString(d) {
|
|
10
|
+
return d.toISOString();
|
|
11
|
+
} : function _toISOString(d) {
|
|
12
|
+
return d.getUTCFullYear() + '-' + pad(d.getUTCMonth() + 1) + '-' + pad(d.getUTCDate()) + 'T' + pad(d.getUTCHours()) + ':' + pad(d.getUTCMinutes()) + ':' + pad(d.getUTCSeconds()) + '.' + (d.getUTCMilliseconds() / 1000).toFixed(3).slice(2, 5) + 'Z';
|
|
13
|
+
};
|
|
14
|
+
var _toISOString$1 = _toISOString;
|
|
15
|
+
var _toISOString_1 = _toISOString$1;
|
|
16
|
+
|
|
17
|
+
exports._toISOString_1 = _toISOString_1;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _includes$1 = require('./_includes.cjs');
|
|
4
|
+
var _map$1 = require('./_map.cjs');
|
|
5
|
+
var _quote$1 = require('./_quote.cjs');
|
|
6
|
+
var _toISOString$1 = require('./_toISOString.cjs');
|
|
7
|
+
var keys$1 = require('../keys.cjs');
|
|
8
|
+
var reject$1 = require('../reject.cjs');
|
|
9
|
+
|
|
10
|
+
var _includes = _includes$1._includes_1;
|
|
11
|
+
var _map = _map$1._map_1;
|
|
12
|
+
var _quote = _quote$1._quote_1;
|
|
13
|
+
var _toISOString = _toISOString$1._toISOString_1;
|
|
14
|
+
var keys = keys$1.keys_1;
|
|
15
|
+
var reject = reject$1.reject_1;
|
|
16
|
+
function _toString(x, seen) {
|
|
17
|
+
var recur = function recur(y) {
|
|
18
|
+
var xs = seen.concat([x]);
|
|
19
|
+
return _includes(y, xs) ? '<Circular>' : _toString(y, xs);
|
|
20
|
+
}; // mapPairs :: (Object, [String]) -> [String]
|
|
21
|
+
|
|
22
|
+
var mapPairs = function (obj, keys) {
|
|
23
|
+
return _map(function (k) {
|
|
24
|
+
return _quote(k) + ': ' + recur(obj[k]);
|
|
25
|
+
}, keys.slice().sort());
|
|
26
|
+
};
|
|
27
|
+
switch (Object.prototype.toString.call(x)) {
|
|
28
|
+
case '[object Arguments]':
|
|
29
|
+
return '(function() { return arguments; }(' + _map(recur, x).join(', ') + '))';
|
|
30
|
+
case '[object Array]':
|
|
31
|
+
return '[' + _map(recur, x).concat(mapPairs(x, reject(function (k) {
|
|
32
|
+
return /^\d+$/.test(k);
|
|
33
|
+
}, keys(x)))).join(', ') + ']';
|
|
34
|
+
case '[object Boolean]':
|
|
35
|
+
return typeof x === 'object' ? 'new Boolean(' + recur(x.valueOf()) + ')' : x.toString();
|
|
36
|
+
case '[object Date]':
|
|
37
|
+
return 'new Date(' + (isNaN(x.valueOf()) ? recur(NaN) : _quote(_toISOString(x))) + ')';
|
|
38
|
+
case '[object Map]':
|
|
39
|
+
return 'new Map(' + recur(Array.from(x)) + ')';
|
|
40
|
+
case '[object Null]':
|
|
41
|
+
return 'null';
|
|
42
|
+
case '[object Number]':
|
|
43
|
+
return typeof x === 'object' ? 'new Number(' + recur(x.valueOf()) + ')' : 1 / x === -Infinity ? '-0' : x.toString(10);
|
|
44
|
+
case '[object Set]':
|
|
45
|
+
return 'new Set(' + recur(Array.from(x).sort()) + ')';
|
|
46
|
+
case '[object String]':
|
|
47
|
+
return typeof x === 'object' ? 'new String(' + recur(x.valueOf()) + ')' : _quote(x);
|
|
48
|
+
case '[object Undefined]':
|
|
49
|
+
return 'undefined';
|
|
50
|
+
default:
|
|
51
|
+
if (typeof x.toString === 'function') {
|
|
52
|
+
var repr = x.toString();
|
|
53
|
+
if (repr !== '[object Object]') {
|
|
54
|
+
return repr;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return '{' + mapPairs(x, keys(x)).join(', ') + '}';
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
var _toString_1 = _toString;
|
|
61
|
+
|
|
62
|
+
exports._toString_1 = _toString_1;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _xfBase$1 = require('./_xfBase.cjs');
|
|
4
|
+
|
|
5
|
+
var _xfBase = _xfBase$1._xfBase_1;
|
|
6
|
+
var XFilter = /*#__PURE__*/
|
|
7
|
+
function () {
|
|
8
|
+
function XFilter(f, xf) {
|
|
9
|
+
this.xf = xf;
|
|
10
|
+
this.f = f;
|
|
11
|
+
}
|
|
12
|
+
XFilter.prototype['@@transducer/init'] = _xfBase.init;
|
|
13
|
+
XFilter.prototype['@@transducer/result'] = _xfBase.result;
|
|
14
|
+
XFilter.prototype['@@transducer/step'] = function (result, input) {
|
|
15
|
+
return this.f(input) ? this.xf['@@transducer/step'](result, input) : result;
|
|
16
|
+
};
|
|
17
|
+
return XFilter;
|
|
18
|
+
}();
|
|
19
|
+
function _xfilter(f) {
|
|
20
|
+
return function (xf) {
|
|
21
|
+
return new XFilter(f, xf);
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
var _xfilter_1 = _xfilter;
|
|
25
|
+
|
|
26
|
+
exports._xfilter_1 = _xfilter_1;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _complement$1 = require('./internal/_complement.cjs');
|
|
4
|
+
var _curry2$1 = require('./internal/_curry2.cjs');
|
|
5
|
+
var filter$1 = require('./filter.cjs');
|
|
6
|
+
|
|
7
|
+
var _complement = _complement$1._complement_1;
|
|
8
|
+
var _curry2 = _curry2$1._curry2_1;
|
|
9
|
+
var filter = filter$1.filter_1;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The complement of [`filter`](#filter).
|
|
13
|
+
*
|
|
14
|
+
* Acts as a transducer if a transformer is given in list position. Filterable
|
|
15
|
+
* objects include plain objects or any object that has a filter method such
|
|
16
|
+
* as `Array`.
|
|
17
|
+
*
|
|
18
|
+
* @func
|
|
19
|
+
* @memberOf R
|
|
20
|
+
* @since v0.1.0
|
|
21
|
+
* @category List
|
|
22
|
+
* @sig Filterable f => (a -> Boolean) -> f a -> f a
|
|
23
|
+
* @param {Function} pred
|
|
24
|
+
* @param {Array} filterable
|
|
25
|
+
* @return {Array}
|
|
26
|
+
* @see R.filter, R.transduce, R.addIndex
|
|
27
|
+
* @example
|
|
28
|
+
*
|
|
29
|
+
* const isOdd = (n) => n % 2 !== 0;
|
|
30
|
+
*
|
|
31
|
+
* R.reject(isOdd, [1, 2, 3, 4]); //=> [2, 4]
|
|
32
|
+
*
|
|
33
|
+
* R.reject(isOdd, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4}
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
var reject = /*#__PURE__*/
|
|
37
|
+
_curry2(function reject(pred, filterable) {
|
|
38
|
+
return filter(_complement(pred), filterable);
|
|
39
|
+
});
|
|
40
|
+
var reject$1 = reject;
|
|
41
|
+
var reject_1 = reject$1;
|
|
42
|
+
|
|
43
|
+
exports.reject_1 = reject_1;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _curry2$1 = require('./internal/_curry2.cjs');
|
|
4
|
+
|
|
5
|
+
var _curry2 = _curry2$1._curry2_1;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Calls an input function `n` times, returning an array containing the results
|
|
9
|
+
* of those function calls.
|
|
10
|
+
*
|
|
11
|
+
* `fn` is passed one argument: The current value of `n`, which begins at `0`
|
|
12
|
+
* and is gradually incremented to `n - 1`.
|
|
13
|
+
*
|
|
14
|
+
* @func
|
|
15
|
+
* @memberOf R
|
|
16
|
+
* @since v0.2.3
|
|
17
|
+
* @category List
|
|
18
|
+
* @sig (Number -> a) -> Number -> [a]
|
|
19
|
+
* @param {Function} fn The function to invoke. Passed one argument, the current value of `n`.
|
|
20
|
+
* @param {Number} n A value between `0` and `n - 1`. Increments after each function call.
|
|
21
|
+
* @return {Array} An array containing the return values of all calls to `fn`.
|
|
22
|
+
* @see R.repeat
|
|
23
|
+
* @example
|
|
24
|
+
*
|
|
25
|
+
* R.times(R.identity, 5); //=> [0, 1, 2, 3, 4]
|
|
26
|
+
* @symb R.times(f, 0) = []
|
|
27
|
+
* @symb R.times(f, 1) = [f(0)]
|
|
28
|
+
* @symb R.times(f, 2) = [f(0), f(1)]
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
var times = /*#__PURE__*/
|
|
32
|
+
_curry2(function times(fn, n) {
|
|
33
|
+
var len = Number(n);
|
|
34
|
+
var idx = 0;
|
|
35
|
+
var list;
|
|
36
|
+
if (len < 0 || isNaN(len)) {
|
|
37
|
+
throw new RangeError('n must be a non-negative number');
|
|
38
|
+
}
|
|
39
|
+
list = [];
|
|
40
|
+
while (idx < len) {
|
|
41
|
+
list.push(fn(idx));
|
|
42
|
+
idx += 1;
|
|
43
|
+
}
|
|
44
|
+
return list;
|
|
45
|
+
});
|
|
46
|
+
var times$1 = times;
|
|
47
|
+
var times_1 = times$1;
|
|
48
|
+
|
|
49
|
+
exports.times_1 = times_1;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _curry1$1 = require('./internal/_curry1.cjs');
|
|
4
|
+
var _toString$1 = require('./internal/_toString.cjs');
|
|
5
|
+
|
|
6
|
+
var _curry1 = _curry1$1._curry1_1;
|
|
7
|
+
var _toString = _toString$1._toString_1;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Returns the string representation of the given value. `eval`'ing the output
|
|
11
|
+
* should result in a value equivalent to the input value. Many of the built-in
|
|
12
|
+
* `toString` methods do not satisfy this requirement.
|
|
13
|
+
*
|
|
14
|
+
* If the given value is an `[object Object]` with a `toString` method other
|
|
15
|
+
* than `Object.prototype.toString`, this method is invoked with no arguments
|
|
16
|
+
* to produce the return value. This means user-defined constructor functions
|
|
17
|
+
* can provide a suitable `toString` method. For example:
|
|
18
|
+
*
|
|
19
|
+
* function Point(x, y) {
|
|
20
|
+
* this.x = x;
|
|
21
|
+
* this.y = y;
|
|
22
|
+
* }
|
|
23
|
+
*
|
|
24
|
+
* Point.prototype.toString = function() {
|
|
25
|
+
* return 'new Point(' + this.x + ', ' + this.y + ')';
|
|
26
|
+
* };
|
|
27
|
+
*
|
|
28
|
+
* R.toString(new Point(1, 2)); //=> 'new Point(1, 2)'
|
|
29
|
+
*
|
|
30
|
+
* @func
|
|
31
|
+
* @memberOf R
|
|
32
|
+
* @since v0.14.0
|
|
33
|
+
* @category String
|
|
34
|
+
* @sig * -> String
|
|
35
|
+
* @param {*} val
|
|
36
|
+
* @return {String}
|
|
37
|
+
* @example
|
|
38
|
+
*
|
|
39
|
+
* R.toString(42); //=> '42'
|
|
40
|
+
* R.toString('abc'); //=> '"abc"'
|
|
41
|
+
* R.toString([1, 2, 3]); //=> '[1, 2, 3]'
|
|
42
|
+
* R.toString({foo: 1, bar: 2, baz: 3}); //=> '{"bar": 2, "baz": 3, "foo": 1}'
|
|
43
|
+
* R.toString(new Date('2001-02-03T04:05:06Z')); //=> 'new Date("2001-02-03T04:05:06.000Z")'
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
var toString = /*#__PURE__*/
|
|
47
|
+
_curry1(function toString(val) {
|
|
48
|
+
return _toString(val, []);
|
|
49
|
+
});
|
|
50
|
+
var toString$1 = toString;
|
|
51
|
+
var toString_1 = toString$1;
|
|
52
|
+
|
|
53
|
+
exports.toString_1 = toString_1;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _curry1$1 = require('./internal/_curry1.cjs');
|
|
4
|
+
|
|
5
|
+
var _curry1 = _curry1$1._curry1_1;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Gives a single-word string description of the (native) type of a value,
|
|
9
|
+
* returning such answers as 'Object', 'Number', 'Array', or 'Null'. Does not
|
|
10
|
+
* attempt to distinguish user Object types any further, reporting them all as
|
|
11
|
+
* 'Object'.
|
|
12
|
+
*
|
|
13
|
+
* @func
|
|
14
|
+
* @memberOf R
|
|
15
|
+
* @since v0.8.0
|
|
16
|
+
* @category Type
|
|
17
|
+
* @sig * -> String
|
|
18
|
+
* @param {*} val The value to test
|
|
19
|
+
* @return {String}
|
|
20
|
+
* @example
|
|
21
|
+
*
|
|
22
|
+
* R.type({}); //=> "Object"
|
|
23
|
+
* R.type(1); //=> "Number"
|
|
24
|
+
* R.type(false); //=> "Boolean"
|
|
25
|
+
* R.type('s'); //=> "String"
|
|
26
|
+
* R.type(null); //=> "Null"
|
|
27
|
+
* R.type([]); //=> "Array"
|
|
28
|
+
* R.type(/[A-z]/); //=> "RegExp"
|
|
29
|
+
* R.type(() => {}); //=> "Function"
|
|
30
|
+
* R.type(async () => {}); //=> "AsyncFunction"
|
|
31
|
+
* R.type(undefined); //=> "Undefined"
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
var type = /*#__PURE__*/
|
|
35
|
+
_curry1(function type(val) {
|
|
36
|
+
return val === null ? 'Null' : val === undefined ? 'Undefined' : Object.prototype.toString.call(val).slice(8, -1);
|
|
37
|
+
});
|
|
38
|
+
var type$1 = type;
|
|
39
|
+
var type_1 = type$1;
|
|
40
|
+
|
|
41
|
+
exports.type_1 = type_1;
|