mirror of
https://github.com/littensy/charm.git
synced 2026-10-21 03:36:11 +00:00
feat: add serializeArrays option (#29)
* feat: add optional `convertArrays` * perf: sync atomic changes to keys * feat: add `serializeArrays` option * docs: rephrase debug mode flag
This commit is contained in:
parent
e4019c049c
commit
aae769c981
21 changed files with 230 additions and 205 deletions
|
|
@ -98,4 +98,14 @@ return function()
|
|||
expect(applied["2"]).to.be.ok()
|
||||
expect(applied[2]).to.never.be.ok()
|
||||
end)
|
||||
|
||||
it("optionally fixes sparse arrays", function()
|
||||
for index in next, patch.diff({ 1, 1, 1, 1, 1 }, { 2, 1, 1, 2 }) do
|
||||
expect(index).to.be.a("string")
|
||||
end
|
||||
|
||||
for index in next, patch.diff({ 1, 1, 1, 1, 1 }, { 2, 1, 1, 2 }, false) do
|
||||
expect(index).to.be.a("number")
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue