$ gnpm install quote-unquote
quote and unquote strings. escapes internal quotes and slashes. Automatically decides whether to use single or double quotes.
foo's bar
=> "foo's bar"
"foo's bar"
=> "\"foo's bar\""
"\"foo's bar\""
=> "\"\\\"foo's bar\\\"\""
etc
the reverse of the above.
"foo's bar"
=> foo's bar
"\"foo's bar\""
=> "foo's bar"
"\"\\\"foo's bar\\\"\""
=> "\"foo's bar\""
MIT
Copyright 2013 - present © cnpmjs.org | Home |