Skip to content

Commit

Permalink
chore: readme example errors (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
bgoscinski committed Feb 9, 2022
1 parent fb41df6 commit 56923fe
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions readme.md
Expand Up @@ -56,13 +56,13 @@ console.log(foo);
//=> }

let bar = { a: { x: 7 }, b:[1, 2, 3] };
dset(bar, 'bar.1', 999);
// or: dset(bar, ['bar', 1], 999);
// or: dset(bar, ['bar', '1'], 999);
dset(bar, 'b.1', 999);
// or: dset(bar, ['b', 1], 999);
// or: dset(bar, ['b', '1'], 999);
console.log(bar);
//=> {
//=> a: { x: 7 },
//=> bar: [1, 999, 3],
//=> b: [1, 999, 3],
//=> }

dset(bar, 'a.y.0', 8);
Expand All @@ -74,7 +74,7 @@ console.log(bar);
//=> x: 7,
//=> y: [8],
//=> },
//=> bar: [1, 999, 3],
//=> b: [1, 999, 3],
//=> }

let baz = {};
Expand Down

0 comments on commit 56923fe

Please sign in to comment.