Skip to content

Commit d359c05

Browse files
authored
fix typos (#33)
1 parent 6120668 commit d359c05

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ let completeNotification = { 'kind': 'C' }
130130
## Difference with callbag spec
131131

132132
While the original callbag spec requires payload to be optional - `(type: number, payload?: any) => void`,
133-
callbag.vim requires payload to be required. This is primarily due to limition on how vimscript functions works.
133+
callbag.vim requires payload to be required. This is primarily due to limitation on how vimscript functions works.
134134
Having optional parameter and using `...` and `a:0` to read the extra args and then use `a:1` makes the code complicated.
135135
You can use `callbag#undefined()` method to pass undefined. `callbag#isUndefined(value)`
136136
can be used to check if a value is defined or undefined.
@@ -158,7 +158,7 @@ Refer to [examples.vim](examples.vim) for more.
158158
## Synchronously waiting for completion or error
159159

160160
`callbag#toList()` operator with `wait()` will allow to synchronously wait for
161-
completion or error. Default value for `sleep` is `1` miliseconds and `timeout`
161+
completion or error. Default value for `sleep` is `1` milliseconds and `timeout`
162162
is `-1` which means it will never timeout.
163163

164164
```vim

autoload/callbag.vim

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -273,10 +273,10 @@ endfunction
273273

274274
function! s:tapFactory(data, source) abort
275275
let a:data['source'] = a:source
276-
return function('s:tapSouceFactory', [a:data])
276+
return function('s:tapSourceFactory', [a:data])
277277
endfunction
278278

279-
function! s:tapSouceFactory(data, start, sink) abort
279+
function! s:tapSourceFactory(data, start, sink) abort
280280
if a:start != 0 | return | endif
281281
let a:data['sink'] = a:sink
282282
call a:data['source'](0, function('s:tapSourceCallback', [a:data]))
@@ -410,10 +410,10 @@ function! s:skipMaxSource(data, start, sink) abort
410410
if a:start != 0 | return | endif
411411
let a:data['sink'] = a:sink
412412
let a:data['skipped'] = 0
413-
call a:data['source'](0, function('s:skipSouceCallback', [a:data]))
413+
call a:data['source'](0, function('s:skipSourceCallback', [a:data]))
414414
endfunction
415415

416-
function! s:skipSouceCallback(data, t, d) abort
416+
function! s:skipSourceCallback(data, t, d) abort
417417
if a:t == 0
418418
let a:data['talkback'] = a:d
419419
call a:data['sink'](a:t, a:d)
@@ -1047,7 +1047,7 @@ function! s:takeUntilFactory(data, start, sink) abort
10471047
let a:data['sink'] = a:sink
10481048
let a:data['inited'] = 1
10491049
let a:data['sourceTalkback'] = 0
1050-
let a:data['notiferTalkback'] = 0
1050+
let a:data['notifierTalkback'] = 0
10511051
let a:data['done'] = s:takeUntilUniqueToken
10521052
call a:data['source'](0, function('s:takeUntilSourceCallback', [a:data]))
10531053
endfunction
@@ -1496,7 +1496,7 @@ endfunction
14961496
" \ 'env': {},
14971497
" \ })
14981498
" call s:Stdin(1, 'hi')
1499-
" call s:Stdin(2, callbag#undefined()) " requried to close stdin
1499+
" call s:Stdin(2, callbag#undefined()) " required to close stdin
15001500
function! callbag#spawn(cmd, ...) abort
15011501
let l:data = { 'cmd': a:cmd, 'opt': a:0 > 0 ? copy(a:000[0]) : {} }
15021502
return callbag#create(function('s:spawnCreate', [l:data]))

examples.vim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,13 @@ function! callbag#demo() abort
181181
call l:Subject(1, 'world')
182182
call l:Subject(2, callbag#undefined())
183183

184-
let l:ShareSouce = callbag#share(callbag#interval(1000))
184+
let l:ShareSource = callbag#share(callbag#interval(1000))
185185
call callbag#pipe(
186-
\ l:ShareSouce,
186+
\ l:ShareSource,
187187
\ callbag#subscribe({x->s:log('first ' . x)})
188188
\ )
189189
call timer_start(3500, {->callbag#pipe(
190-
\ l:ShareSouce,
190+
\ l:ShareSource,
191191
\ callbag#subscribe({x->s:log('second ' . x)})
192192
\ )})
193193
call callbag#pipe(

0 commit comments

Comments
 (0)