aboutsummaryrefslogtreecommitdiff
path: root/node_modules/lodash/toString.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/lodash/toString.js')
-rw-r--r--node_modules/lodash/toString.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/node_modules/lodash/toString.js b/node_modules/lodash/toString.js
new file mode 100644
index 0000000..daaf681
--- /dev/null
+++ b/node_modules/lodash/toString.js
@@ -0,0 +1,28 @@
+var baseToString = require('./_baseToString');
+
+/**
+ * Converts `value` to a string. An empty string is returned for `null`
+ * and `undefined` values. The sign of `-0` is preserved.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {string} Returns the converted string.
+ * @example
+ *
+ * _.toString(null);
+ * // => ''
+ *
+ * _.toString(-0);
+ * // => '-0'
+ *
+ * _.toString([1, 2, 3]);
+ * // => '1,2,3'
+ */
+function toString(value) {
+ return value == null ? '' : baseToString(value);
+}
+
+module.exports = toString;