Releases: humanwhocodes/momoa
Releases · humanwhocodes/momoa
momoa-js: v3.0.5
momoa-js: v3.0.4
momoa-js: v3.0.3
momoa-js: v3.0.2
momoa-rs: v3.0.1
momoa-js: v3.0.1
momoa-rs: v3.0.0
momoa-js: v3.0.0
3.0.0 (2023-03-15)
Breaking Changes
- The
comments
option toparse()
andtokenize()
has been removed and replaced with themode
option, which can be either"json"
for JSON parsing or"jsonc"
to parse JSON with C-style comments. - The
type
property on tokens has been expanded:"Punctuator"
has been removed and replaced with specific token types for each of the former punctuator characters,"LBrace"
,"RBrace"
,"LBracket"
,"RBracket"
,"Comma"
, and"Colon"
- The
value
property has been removed from tokens in order to improve performance. You can easily retrieve the value of any token viatext.slice(token.loc.start.offset, token.loc.end.offset)
ortext.slice(token.range[0], token.range[1])
(ifranges: true
is used). - A new
Element
node as been introduced to be the parent node of each array element (similar toMember
inObject.members
). This allows you to easily look up the AST to determine if a value is inside of an array or not.