node/tools/v8_gypfiles/ForEachReplace.py
Michaël Zasso c206e7490c
tools: sync gypfiles with V8 7.7
Co-authored-by: Ujjwal Sharma <usharma1998@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/28918
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-08-19 09:26:07 +02:00

8 lines
252 B
Python

# Copyright (c) 2019 Ujjwal Sharma <usharma1998@gmail>. All rights reserved.
# Use of this source code is governed by an MIT-style license.
def DoMain(args):
old = args.pop(0)
new = args.pop(0)
return ' '.join(a.replace(old, new) for a in args)