jsesc

Given some data, jsesc returns the shortest possible stringified & ASCII-safe representation of that data.

Browse on unpkg