File tree Expand file tree Collapse file tree 2 files changed +8
-16
lines changed
Expand file tree Collapse file tree 2 files changed +8
-16
lines changed Original file line number Diff line number Diff line change 7070 },
7171 "type" : " module" ,
7272 "types" : " ./dist/main.d.ts" ,
73- "version" : " 0.0.7 "
73+ "version" : " 0.0.8 "
7474}
Original file line number Diff line number Diff line change @@ -1019,28 +1019,20 @@ class LightOdometer {
10191019 }
10201020
10211021 /**
1022- * Returns the entire current odometer object along with the global options.
1023- * @returns {string } A string representation of the current odometer state.
1022+ * Returns the current odometer object along with the global options.
1023+ * @returns {string } A JSON-parseable string representation of the current odometer state.
10241024 */
10251025 toString ( ) : string {
1026- // Avoid serializing the HTMLElement directly (circular / large). Use an HTML snapshot instead.
1027- const elSnapshot = ( this . el && typeof ( this . el ) . outerHTML === "string" )
1028- ? ( this . el ) . outerHTML
1029- : ( ( ) => {
1030- try {
1031- return JSON . stringify ( this . el )
1032- } catch {
1033- // oxlint-disable-next-line no-base-to-string
1034- return String ( this . el )
1035- }
1036- } ) ( )
1037-
10381026 const snapshot = {
1039- el : elSnapshot ,
10401027 id : this . options . id ,
10411028 value : this . value ,
10421029 options : this . getOptions ( ) ,
10431030 globalOptions : LightOdometer . getGlobalOptions ( ) ,
1031+ watchMutations : this . watchMutations ,
1032+ transitionEndBound : this . transitionEndBound ,
1033+ destroyed : this . destroyed ,
1034+ format : this . format ,
1035+ isAnimating : this . isAnimating ,
10441036 }
10451037
10461038 return JSON . stringify ( snapshot )
You can’t perform that action at this time.
0 commit comments