File tree Expand file tree Collapse file tree 1 file changed +0
-7
lines changed Expand file tree Collapse file tree 1 file changed +0
-7
lines changed Original file line number Diff line number Diff line change 1
1
const chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$' ;
2
2
const reserved = / ^ (?: d o | i f | i n | f o r | i n t | l e t | n e w | t r y | v a r | b y t e | c a s e | c h a r | e l s e | e n u m | g o t o | l o n g | t h i s | v o i d | w i t h | a w a i t | b r e a k | c a t c h | c l a s s | c o n s t | f i n a l | f l o a t | s h o r t | s u p e r | t h r o w | w h i l e | y i e l d | d e l e t e | d o u b l e | e x p o r t | i m p o r t | n a t i v e | r e t u r n | s w i t c h | t h r o w s | t y p e o f | b o o l e a n | d e f a u l t | e x t e n d s | f i n a l l y | p a c k a g e | p r i v a t e | a b s t r a c t | c o n t i n u e | d e b u g g e r | f u n c t i o n | v o l a t i l e | i n t e r f a c e | p r o t e c t e d | t r a n s i e n t | i m p l e m e n t s | i n s t a n c e o f | s y n c h r o n i z e d ) $ / ;
3
- const unsafe = / [ < > \/ \u2028 \u2029 ] / g;
4
3
const escaped : Record < string , string > = {
5
4
'<' : '\\u003C' ,
6
5
'>' : '\\u003E' ,
@@ -19,8 +18,6 @@ const objectProtoOwnPropertyNames = Object.getOwnPropertyNames(Object.prototype)
19
18
export default function devalue ( value : any ) {
20
19
const counts = new Map ( ) ;
21
20
22
- let n = 0 ;
23
-
24
21
function walk ( thing : any ) {
25
22
if ( typeof thing === 'function' ) {
26
23
throw new Error ( `Cannot stringify a function` ) ;
@@ -209,10 +206,6 @@ function isPrimitive(thing: any) {
209
206
return Object ( thing ) !== thing ;
210
207
}
211
208
212
- function escape ( char : string ) {
213
- return escaped [ char ] ;
214
- }
215
-
216
209
function stringifyPrimitive ( thing : any ) {
217
210
if ( typeof thing === 'string' ) return stringifyString ( thing ) ;
218
211
if ( thing === void 0 ) return 'void 0' ;
You can’t perform that action at this time.
0 commit comments