Shopify / ejson

EJSON is a small library to manage encrypted secrets using asymmetric encryption.
MIT License
1.33k stars 64 forks source link

Collapse newlines in string literals: #127

Closed burke closed 1 year ago

burke commented 1 year ago

A common use-case is to want to paste in multiline certificates, etc.

This does a first pass on encrypt in order to first collapse multiline strings into valid JSON, before continuing with handling.

sambostock commented 1 year ago

@antoniocheltenham, this looks like the feature you wanted, if you want to provide any feedback.

antoniocheltenham commented 1 year ago

This is amazing - RIP cat filename.pem | tr '\r\n' '\#' | sed 's:#:\\n:g' 🚀