Skip to content

@std/yaml zero-started numeric strings stringify to numbers #7040

@victorenator

Description

@victorenator

Describe the bug
zero-started numeric strings like '08' or '09' stringify to numbers

Steps to Reproduce

import {stringify} from 'jsr:@std/yaml';

stringify('07'); // returns expected result "'07'\n"
stringify('08'); // returns unexpected result "08\n"
stringify('09'); // returns unexpected result "09\n"

Expected behavior

stringify('08') should return "'08'\n"
stringify('09') should return "'09'\n"

Environment

  • OS: Debian 13
  • deno version: 2.7.4 (stable, release, x86_64-unknown-linux-gnu)
  • @std/yaml version: 1.0.12

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions