Archived
1
0
Fork 0
This repository has been archived on 2024-02-06. You can view files and clone it, but cannot push or open issues or pull requests.
api-ts-gen/dist/utils/qStringify.js
sup39 85c026ba01 object-type properties conversion in req func
Change Full#advance and implement Full#advanced
2020-08-17 13:12:34 +08:00

19 lines
742 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Qs0 = require("qs");
var options0 = {
filter: function (prefix, value) {
var _a;
var con = value === null || value === void 0 ? void 0 : value.constructor;
if (con === null || con === Array || con === Object)
return value;
if (con === Date)
return value.toJSON();
// use Class.toString() if defined explicitly
return ((_a = con.prototype) === null || _a === void 0 ? void 0 : _a.hasOwnProperty('toString')) ? value.toString() : value;
},
};
function qStringify(obj, options) {
return Qs0.stringify(obj, Object.assign({}, options0, options));
}
exports.qStringify = qStringify;