mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 17:37:50 +00:00
Bump to v4.7.0.
This commit is contained in:
14
_baseCastKey.js
Normal file
14
_baseCastKey.js
Normal file
@@ -0,0 +1,14 @@
|
||||
import isSymbol from './isSymbol';
|
||||
|
||||
/**
|
||||
* Casts `value` to a string if it's not a string or symbol.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to inspect.
|
||||
* @returns {string|symbol} Returns the cast key.
|
||||
*/
|
||||
function baseCastKey(key) {
|
||||
return (typeof key == 'string' || isSymbol(key)) ? key : (key + '');
|
||||
}
|
||||
|
||||
export default baseCastKey;
|
||||
Reference in New Issue
Block a user