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