File tree Expand file tree Collapse file tree 1 file changed +2
-17
lines changed
Expand file tree Collapse file tree 1 file changed +2
-17
lines changed Original file line number Diff line number Diff line change @@ -73,8 +73,8 @@ export class IniMap {
7373 *
7474 * @param formatting Optional formatting options when printing an INI file.
7575 */
76- constructor ( formatting ? : FormattingOptions ) {
77- this . #formatting = this . #cleanFormatting ( formatting ) ;
76+ constructor ( formatting : FormattingOptions = { } ) {
77+ this . #formatting = formatting ;
7878 }
7979
8080 /**
@@ -228,14 +228,6 @@ export class IniMap {
228228 yield line ;
229229 }
230230
231- #cleanFormatting( options ?: FormattingOptions ) : FormattingOptions {
232- return Object . fromEntries (
233- Object . entries ( options ?? { } ) . filter ( ( [ key ] ) =>
234- FormattingKeys . includes ( key as keyof FormattingOptions )
235- ) ,
236- ) ;
237- }
238-
239231 /**
240232 * Convert this `IniMap` to a plain object.
241233 *
@@ -479,13 +471,6 @@ const LineOp = {
479471 Del : - 1 ,
480472 Add : 1 ,
481473} as const ;
482- const DummyFormatting : Required < FormattingOptions > = {
483- lineBreak : "\n" ,
484- pretty : false ,
485- } ;
486- const FormattingKeys = Object . keys (
487- DummyFormatting ,
488- ) as ( keyof FormattingOptions ) [ ] ;
489474
490475interface LineComment {
491476 type : "comment" ;
You can’t perform that action at this time.
0 commit comments