public
Last active

grep .emit() calls

  • Download Gist
emit.sh
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#!/usr/bin/env bash
 
echo
 
find ${1:-.} -name "*.js" \
| xargs cat \
| grep '.emit(' \
| sed 's/.*.emit(//g' \
| sed -E "s/,|'|); *$//g" \
| awk '{
printf " \033[36m%-10s\033[0m", $1
for (i = 2; i <= NF; ++i)
printf " \033[90m%s\033[0m", $i
printf "\n"
}'
 
echo

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.