mirror of
https://github.com/voson-wang/toon.git
synced 2026-01-29 23:34:10 +08:00
feat!: remove optional length marker option [#N] in favor of [N]
This commit is contained in:
@@ -13,7 +13,6 @@ export async function encodeToToon(config: {
|
||||
output?: string
|
||||
indent: NonNullable<EncodeOptions['indent']>
|
||||
delimiter: NonNullable<EncodeOptions['delimiter']>
|
||||
lengthMarker: NonNullable<EncodeOptions['lengthMarker']>
|
||||
keyFolding?: NonNullable<EncodeOptions['keyFolding']>
|
||||
flattenDepth?: number
|
||||
printStats: boolean
|
||||
@@ -31,7 +30,6 @@ export async function encodeToToon(config: {
|
||||
const encodeOptions: EncodeOptions = {
|
||||
delimiter: config.delimiter,
|
||||
indent: config.indent,
|
||||
lengthMarker: config.lengthMarker,
|
||||
keyFolding: config.keyFolding,
|
||||
flattenDepth: config.flattenDepth,
|
||||
}
|
||||
|
||||
@@ -41,11 +41,6 @@ export const mainCommand: CommandDef<{
|
||||
description: string
|
||||
default: string
|
||||
}
|
||||
lengthMarker: {
|
||||
type: 'boolean'
|
||||
description: string
|
||||
default: false
|
||||
}
|
||||
strict: {
|
||||
type: 'boolean'
|
||||
description: string
|
||||
@@ -107,11 +102,6 @@ export const mainCommand: CommandDef<{
|
||||
description: 'Indentation size',
|
||||
default: '2',
|
||||
},
|
||||
lengthMarker: {
|
||||
type: 'boolean',
|
||||
description: 'Use length marker (#) for arrays',
|
||||
default: false,
|
||||
},
|
||||
strict: {
|
||||
type: 'boolean',
|
||||
description: 'Enable strict mode for decoding',
|
||||
@@ -187,10 +177,9 @@ export const mainCommand: CommandDef<{
|
||||
output: outputPath,
|
||||
delimiter: delimiter as Delimiter,
|
||||
indent,
|
||||
lengthMarker: args.lengthMarker === true ? '#' : false,
|
||||
printStats: args.stats === true,
|
||||
keyFolding: keyFolding as NonNullable<EncodeOptions['keyFolding']>,
|
||||
flattenDepth,
|
||||
printStats: args.stats === true,
|
||||
})
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user