From 6bf0a5cb5034a7e684dcc3500e841785237ce2dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 19:32:43 +0200 Subject: Adding upstream version 1:115.7.0. Signed-off-by: Daniel Baumann --- third_party/js/cfworker/exports.awk | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 third_party/js/cfworker/exports.awk (limited to 'third_party/js/cfworker/exports.awk') diff --git a/third_party/js/cfworker/exports.awk b/third_party/js/cfworker/exports.awk new file mode 100644 index 0000000000..17f63d7bbf --- /dev/null +++ b/third_party/js/cfworker/exports.awk @@ -0,0 +1,20 @@ +#!/bin/awk -f + +BEGIN { + n_exports = 0; +} + +{ + if ($0 ~ /^exports.*=/) { + exports[n_exports] = substr($3, 0, length($3) - 1); + n_exports++; + } else { + print; + } +} + +END { + for (i = 0; i < n_exports; i++) { + print "this." exports[i] " = " exports[i] ";"; + } +} -- cgit v1.2.3