"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Functional_1 = require("../../../../Class/Functional");
const _ids_1 = require("../../../_ids");
class Stringify extends Functional_1.Functional {
    constructor(system) {
        super({
            i: ['obj'],
            o: ['str'],
        }, {}, system, _ids_1.ID_STRINGIFY_2);
    }
    f({ obj }, done) {
        const { api: { querystring: { stringify }, }, } = this.__system;
        let str;
        try {
            str = stringify(obj);
        }
        catch (err) {
            done(undefined, err.message);
            return;
        }
        done({ str });
    }
}
exports.default = Stringify;
//# sourceMappingURL=index.js.map