You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

14 lines
347 B

var isSymbol = require('./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 + '');
}
module.exports = baseCastKey;