denoland / denoland/std

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

Open
#7,040 2 comments 0 reactions 0 assignees View on GitHub
bug yaml
Dominant language
TypeScript
Stars
3.6k
Forks
681
PR merge metrics
No merged PRs in 30d

Description

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

**Steps to Reproduce**

```js
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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.