MCPcopy
hub / github.com/di-sukharev/opencommit / "node_modules/qs/lib/stringify.js"

Function "node_modules/qs/lib/stringify.js"

out/cli.cjs:28112–28387  ·  view source on GitHub ↗
(exports2, module2)

Source from the content-addressed store, hash-verified

28110// node_modules/qs/lib/stringify.js
28111var require_stringify = __commonJS({
28112 "node_modules/qs/lib/stringify.js"(exports2, module2) {
28113 "use strict";
28114 var getSideChannel = require_side_channel();
28115 var utils = require_utils2();
28116 var formats = require_formats();
28117 var has = Object.prototype.hasOwnProperty;
28118 var arrayPrefixGenerators = {
28119 brackets: function brackets(prefix) {
28120 return prefix + "[]";
28121 },
28122 comma: "comma",
28123 indices: function indices(prefix, key) {
28124 return prefix + "[" + key + "]";
28125 },
28126 repeat: function repeat(prefix) {
28127 return prefix;
28128 }
28129 };
28130 var isArray2 = Array.isArray;
28131 var push = Array.prototype.push;
28132 var pushToArray = function(arr, valueOrArray) {
28133 push.apply(arr, isArray2(valueOrArray) ? valueOrArray : [valueOrArray]);
28134 };
28135 var toISO = Date.prototype.toISOString;
28136 var defaultFormat = formats["default"];
28137 var defaults2 = {
28138 addQueryPrefix: false,
28139 allowDots: false,
28140 allowEmptyArrays: false,
28141 arrayFormat: "indices",
28142 charset: "utf-8",
28143 charsetSentinel: false,
28144 delimiter: "&",
28145 encode: true,
28146 encodeDotInKeys: false,
28147 encoder: utils.encode,
28148 encodeValuesOnly: false,
28149 format: defaultFormat,
28150 formatter: formats.formatters[defaultFormat],
28151 // deprecated
28152 indices: false,
28153 serializeDate: function serializeDate(date) {
28154 return toISO.call(date);
28155 },
28156 skipNulls: false,
28157 strictNullHandling: false
28158 };
28159 var isNonNullishPrimitive = function isNonNullishPrimitive2(v5) {
28160 return typeof v5 === "string" || typeof v5 === "number" || typeof v5 === "boolean" || typeof v5 === "symbol" || typeof v5 === "bigint";
28161 };
28162 var sentinel = {};
28163 var stringify2 = function stringify3(object, prefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, encoder, filter2, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, sideChannel) {
28164 var obj = object;
28165 var tmpSc = sideChannel;
28166 var step = 0;
28167 var findFlag = false;
28168 while ((tmpSc = tmpSc.get(sentinel)) !== void 0 && !findFlag) {
28169 var pos = tmpSc.get(object);

Callers

nothing calls this directly

Calls 6

isArray2Function · 0.85
pushToArrayFunction · 0.85
stringify2Function · 0.85
keysMethod · 0.45
sortMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…