Skip to content

Instantly share code, notes, and snippets.

@hotwatermorning
Last active September 27, 2023 15:37
Show Gist options
  • Save hotwatermorning/77e163e02e7adea3753b17a7d27dd3ad to your computer and use it in GitHub Desktop.
Save hotwatermorning/77e163e02e7adea3753b17a7d27dd3ad to your computer and use it in GitHub Desktop.
文字列を JSON.stringify するワンライナー
cat /dev/stdin | node -e 'console.log( JSON.stringify(require("fs").readFileSync("/dev/stdin", "utf-8")) );'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment