"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Functional_1 = require("../../../../Class/Functional");
const _ids_1 = require("../../../_ids");
class Replace extends Functional_1.Functional {
    constructor(system) {
        super({
            i: ['str', 'regex', 'flags', 'with'],
            o: ['str'],
        }, {}, system, _ids_1.ID_REPLACE);
    }
    f({ str, regex, with: _with, flags }, done) {
        done({ str: str.replace(new RegExp(regex, flags), _with) });
    }
}
exports.default = Replace;
//# sourceMappingURL=index.js.map