X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=node_modules%2Funcss%2Fnode_modules%2Fform-data%2Fnode_modules%2Flodash%2F_toKey.js;fp=node_modules%2Funcss%2Fnode_modules%2Fform-data%2Fnode_modules%2Flodash%2F_toKey.js;h=c6d645c4d008137b59801ab758249afb60eba891;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hp=0000000000000000000000000000000000000000;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad;p=yaffs-website diff --git a/node_modules/uncss/node_modules/form-data/node_modules/lodash/_toKey.js b/node_modules/uncss/node_modules/form-data/node_modules/lodash/_toKey.js new file mode 100644 index 000000000..c6d645c4d --- /dev/null +++ b/node_modules/uncss/node_modules/form-data/node_modules/lodash/_toKey.js @@ -0,0 +1,21 @@ +var isSymbol = require('./isSymbol'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +module.exports = toKey;