15 Commits

Author SHA1 Message Date
Lucas
21f7de789f feat(parser) retain inline object notation on stringify() 2019-12-15 17:15:34 -03:00
Rebecca Turner
6249d86d8d chore: Switch to @iarna/standard 2019-02-20 12:50:33 -08:00
龙腾道
7ee009eda6 fix: __proto__ property setting on plain Object
Credit: @LongTengDao
Fixes: #13
2019-02-18 11:39:12 -08:00
Rebecca Turner
1cc9c779f2 fix(stringify): Escape control chars when emitting them 2018-09-03 19:29:20 -07:00
Rebecca Turner
264cf5aa34 fix(stringify): Multiline strings ending in double quotes need to work 2018-08-31 15:59:02 -07:00
Rebecca Turner
78e8500cdd fix(stringify): Throw error objects on invalid types 2018-08-31 10:55:57 -07:00
Rebecca Turner
0731ec1516 fix(stringify): More consistently allow (strip) invalid dates 2018-08-31 10:55:13 -07:00
Rebecca Turner
df11cfc570 fix(Float): Support round-tripping -0 2018-07-26 23:49:21 -07:00
Rebecca Turner
572dc7246a feat(Float): Add inf/nan support 2018-07-26 20:06:22 -07:00
Rebecca Turner
4613b94566 feat(BigInt): Add support for BigInt on platforms that have it 2018-07-26 20:06:22 -07:00
Rebecca Turner
5b80926c2b Export stringifyInline as TOML.stringify.value
This allows users to encoding values as TOML would when encoding them
inline.  These are not valid TOML documents on their own but are pretty
handy all the same.
2018-06-27 18:33:02 -07:00
Rebecca Turner
c8a4946bfa stringify: Fix inappopropriate uses of literal strings when stringifying 2018-06-27 18:33:02 -07:00
Rebecca Turner
4f3b165730 stringify: Allow toJSON to not be a function
This follows JSON.stringify's behavior.  If toJSON exists but isn't a
function then it should be treated as an ordinary property.

Fixes: #2
2018-06-27 18:33:02 -07:00
Rebecca Turner
7c9152b3b9 Make stringify generate valid results when some nums look like ints and some look like floats 2018-06-15 15:29:17 -07:00
Rebecca Turner
c4f355b529 Write our own TOML parser and add 100% test coverage 2018-06-14 04:05:24 -07:00