By default, your implementation appends files to an existing zip file. We should overwrite by default. After resolving the "result" path, then simply:

    if (!(options && options.overwrite !== false)) {
        fs.unlinkSync(result);
    }