@@ -4,7 +4,7 @@ const _append = Symbol('append')
4
4
5
5
const sqBracketsMatcher = str => str . match ( / ( .+ ) \[ ( [ ^ \] ] + ) \] \. ? ( .* ) $ / )
6
6
7
- // replaces any occurence of an empty-brackets (e.g: []) with a special
7
+ // replaces any occurrence of an empty-brackets (e.g: []) with a special
8
8
// Symbol(append) to represent it, this is going to be useful for the setter
9
9
// method that will push values to the end of the array when finding these
10
10
const replaceAppendSymbols = str => {
@@ -29,7 +29,7 @@ const parseKeys = key => {
29
29
const preSqBracketPortion = index [ 1 ]
30
30
31
31
// we want to have a `new String` wrapper here in order to differentiate
32
- // between multiple occurences of the same string, e.g:
32
+ // between multiple occurrences of the same string, e.g:
33
33
// foo.bar[foo.bar] should split into { foo: { bar: { 'foo.bar': {} } }
34
34
/* eslint-disable-next-line no-new-wrappers */
35
35
const foundKey = new String ( index [ 2 ] )
@@ -41,7 +41,7 @@ const parseKeys = key => {
41
41
sqBracketItems . add ( foundKey )
42
42
43
43
// returns an array that contains either dot-separate items (that will
44
- // be splitted appart during the next step OR the fully parsed keys
44
+ // be split apart during the next step OR the fully parsed keys
45
45
// read from square brackets, e.g:
46
46
// foo.bar[1.0.0].a.b -> ['foo.bar', '1.0.0', 'a.b']
47
47
return [
@@ -142,7 +142,7 @@ const setter = ({ data, key, value, force }) => {
142
142
const keys = parseKeys ( key )
143
143
const setKeys = ( _data , _key ) => {
144
144
// handles array indexes, converting valid integers to numbers,
145
- // note that occurences of Symbol(append) will throw,
145
+ // note that occurrences of Symbol(append) will throw,
146
146
// so we just ignore these for now
147
147
let maybeIndex = Number . NaN
148
148
try {
0 commit comments