forked from public/fvtt-cthulhu-eternal
Initial import with skill sheet working
This commit is contained in:
21
node_modules/slashes/lib/esm/add-slashes.js
generated
vendored
Normal file
21
node_modules/slashes/lib/esm/add-slashes.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
import { getEscapedAny } from './get-escaped-any.js';
|
||||
import { getEscapedJsonUnsafe } from './get-escaped-json-unsafe.js';
|
||||
const addSlashes = (str, options = {}) => {
|
||||
const { getEscaped = getEscapedJsonUnsafe } = options;
|
||||
let result = '';
|
||||
for (const char of str) {
|
||||
const escaped = getEscaped(char);
|
||||
if (!escaped) {
|
||||
result += char;
|
||||
}
|
||||
else if (escaped === true || escaped.length < 2) {
|
||||
result += getEscapedAny(char) || char;
|
||||
}
|
||||
else {
|
||||
result += escaped;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
export { addSlashes };
|
||||
//# sourceMappingURL=add-slashes.js.map
|
||||
Reference in New Issue
Block a user