- Add
regexp: wrap
to wrap ruby regexp inRubyRegexp
.
- Add
string: utf8 | binary
inload()
to force decode or not decode strings.
- Fix
load(string)
should decode string in each code manually.
⚠️ BREAKING. Read the API Reference to learn the new API.
hashToJS
now also accepts number (Integer, Float) keys.
- Fix mutating default options.
- Add
clone(x, opt)
as a shortcut toload(dump(x), opt)
.
- Fix
hashToJS
,hashToMap
with nested hashes.
- Fix dump Bignum logic.
- Fix dump Hash with default value.
- Fix instance variables logic.
- Add
RubyRange
,RubyTime
helper classes.
- Refactored a lot to make this package smaller.
- Fix
T_EXTENDED
parse and dump behavior. - Support dump circular objects.
- esbuild has inline enum, this package can be smaller and run quicker.
- Changed
exports
field in package.json so that it always use ESM when bundling to browser.
- Fixed parsing circular objects.
- Added
load
optiondecodeString: false
andwrapString: true
- Fixed
dump(new RubyObject())
generates wrong marshal data
- Added
load(arrayBuffer)
to parse marshal data - Added
dump(value)
to dump marshal data (not strictly equal to the ruby ones)