Package Exports
- special-escape
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (special-escape) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
special-escape
Escape special characters in a string
Installation
special-escape is published at npmjs.com, and can be installed using npm or yarn.
$ npm install special-escape # npm
$ yarn add special-escape # yarnimport resolveWhen from 'special-escape'; // ES6+
const resolveWhen = require('special-escape'); // ES5Usage
const specialChars = ['+', '-', '=', '>', '.', '!', '(', ')', '{', '}', '[', ']', '^', '"', '~', '*', '?', ':', '\\', '/',]
const escapedString = escapeChars('$2a$10$!NgGQwxmjy..4aQTdsOJw\\O7HUd6FfiFQ2e/2F6XJQh1PeZjWlEbmK', specialChars);
assert(escapedString, '$2a$10$\!NgGQwxmjy\.\.4aQTdsOJw\\O7HUd6FfiFQ2e\/2F6XJQh1PeZjWlEbmK');