"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.stringifyDataObj = exports.stringifyPinData = void 0;
const _1 = require("../Class/$");
const stringify_1 = require("../spec/stringify");
function stringifyPinData(data) {
    const { input, output } = data;
    const _input = stringifyDataObj(input);
    const _output = stringifyDataObj(output);
    const _data = { input: _input, output: _output };
    return _data;
}
exports.stringifyPinData = stringifyPinData;
function stringifyDataObj(obj) {
    const _obj = {};
    for (const name in obj) {
        const data = obj[name];
        if (data !== undefined) {
            if (data instanceof _1.$) {
                _obj[name] = 'null';
            }
            else {
                _obj[name] = (0, stringify_1.stringify)(data);
            }
        }
    }
    return _obj;
}
exports.stringifyDataObj = stringifyDataObj;
//# sourceMappingURL=stringifyPinData.js.map