Skip to content

Commit 081f528

Browse files
committed
remove some unused code
1 parent df1848a commit 081f528

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

src/index.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
const chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$';
22
const reserved = /^(?:do|if|in|for|int|let|new|try|var|byte|case|char|else|enum|goto|long|this|void|with|await|break|catch|class|const|final|float|short|super|throw|while|yield|delete|double|export|import|native|return|switch|throws|typeof|boolean|default|extends|finally|package|private|abstract|continue|debugger|function|volatile|interface|protected|transient|implements|instanceof|synchronized)$/;
3-
const unsafe = /[<>\/\u2028\u2029]/g;
43
const escaped: Record<string, string> = {
54
'<': '\\u003C',
65
'>' : '\\u003E',
@@ -19,8 +18,6 @@ const objectProtoOwnPropertyNames = Object.getOwnPropertyNames(Object.prototype)
1918
export default function devalue(value: any) {
2019
const counts = new Map();
2120

22-
let n = 0;
23-
2421
function walk(thing: any) {
2522
if (typeof thing === 'function') {
2623
throw new Error(`Cannot stringify a function`);
@@ -209,10 +206,6 @@ function isPrimitive(thing: any) {
209206
return Object(thing) !== thing;
210207
}
211208

212-
function escape(char: string) {
213-
return escaped[char];
214-
}
215-
216209
function stringifyPrimitive(thing: any) {
217210
if (typeof thing === 'string') return stringifyString(thing);
218211
if (thing === void 0) return 'void 0';

0 commit comments

Comments
 (0)