projects
/
dotfiles
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Giant blob of minor changes
[dotfiles/.git]
/
.config
/
coc
/
extensions
/
node_modules
/
coc-prettier
/
node_modules
/
ccount
/
index.js
diff --git
a/.config/coc/extensions/node_modules/coc-prettier/node_modules/ccount/index.js
b/.config/coc/extensions/node_modules/coc-prettier/node_modules/ccount/index.js
index 3051998f49e60a503411ae5f530cc928e9a466d6..6110852731085cbe228a7343937bb22fac1bb9cf 100644
(file)
--- a/
.config/coc/extensions/node_modules/coc-prettier/node_modules/ccount/index.js
+++ b/
.config/coc/extensions/node_modules/coc-prettier/node_modules/ccount/index.js
@@
-2,20
+2,20
@@
module.exports = ccount
module.exports = ccount
-function ccount(
valu
e, character) {
- var val
= String(valu
e)
+function ccount(
sourc
e, character) {
+ var val
ue = String(sourc
e)
var count = 0
var index
var count = 0
var index
- if (typeof character !== 'string'
|| character.length !== 1
) {
+ if (typeof character !== 'string') {
throw new Error('Expected character')
}
throw new Error('Expected character')
}
- index = val.indexOf(character)
+ index = val
ue
.indexOf(character)
while (index !== -1) {
count++
while (index !== -1) {
count++
- index = val
.indexOf(character, index + 1
)
+ index = val
ue.indexOf(character, index + character.length
)
}
return count
}
return count