main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | "use strict";
|
---|
2 |
|
---|
3 | exports.__esModule = true;
|
---|
4 | exports["default"] = void 0;
|
---|
5 | var _ramda = require("ramda");
|
---|
6 | function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
---|
7 | /**
|
---|
8 | * Checks if input value is a Symbol.
|
---|
9 | *
|
---|
10 | * @func isSymbol
|
---|
11 | * @memberOf RA
|
---|
12 | * @since {@link https://char0n.github.io/ramda-adjunct/2.22.0|v2.22.0}
|
---|
13 | * @category Type
|
---|
14 | * @sig * -> Boolean
|
---|
15 | * @param {*} val The value to test
|
---|
16 | * @return {boolean}
|
---|
17 | * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol|MDN Symbol}
|
---|
18 | * @example
|
---|
19 | *
|
---|
20 | * RA.isSymbol(Symbol('1')); //=> true
|
---|
21 | * RA.isSymbol(Symbol(1)); //=> true
|
---|
22 | * RA.isSymbol('string'); //=> false
|
---|
23 | * RA.isSymbol(undefined); //=> false
|
---|
24 | * RA.isSymbol(null); //=> false
|
---|
25 | */
|
---|
26 | var isSymbol = (0, _ramda.curryN)(1, function (val) {
|
---|
27 | return _typeof(val) === 'symbol' || _typeof(val) === 'object' && (0, _ramda.type)(val) === 'Symbol';
|
---|
28 | });
|
---|
29 | var _default = isSymbol;
|
---|
30 | exports["default"] = _default; |
---|
Note:
See
TracBrowser
for help on using the repository browser.