-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update params for count-where, truncate, count-substrings
- Loading branch information
Showing
12 changed files
with
72 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { helper } from '@ember/component/helper'; | ||
import { countSubstrings } from 'voca'; | ||
|
||
export default helper(function vocaCountSubstrings(params/*, hash */ ) { | ||
return countSubstrings(params[0]); | ||
export default helper(function vocaCountSubstrings(params ) { | ||
return countSubstrings(params[0], params[1]); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { helper } from '@ember/component/helper'; | ||
import { countWhere } from 'voca'; | ||
|
||
export default helper(function vocaCountWhere(params/*, hash */ ) { | ||
return countWhere(params[0]); | ||
export default helper(function vocaCountWhere(params) { | ||
return countWhere(params[0], params[1]); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { helper } from '@ember/component/helper'; | ||
import { graphemeAt } from 'voca'; | ||
|
||
export default helper(function vocaGraphemeAt(params/*, hash */ ) { | ||
return graphemeAt(params[0]); | ||
export default helper(function vocaGraphemeAt(params) { | ||
return graphemeAt(params[0], params[1]); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { helper } from '@ember/component/helper'; | ||
import { truncate } from 'voca'; | ||
|
||
export default helper(function vocaTruncate(params/*, hash */ ) { | ||
return truncate(params[0]); | ||
export default helper(function vocaTruncate(params) { | ||
return truncate(params[0], params[1], params[2]); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
|
||
<h3>voca-count-substrings:</h3> | ||
<p>Description for voca-count-substrings goes here.</p> | ||
<hr> | ||
<p>Counts the number of substring appearances in subject.</p> | ||
<p> | ||
<code> | ||
\{{ voca-count-substrings "hello world"}} | ||
<code> | ||
\{{ voca-count-substrings "bad boys, bad boys whatcha gonna do?" "boys"}} | ||
</code> | ||
</p> | ||
<p> | ||
<code> | ||
// => {{ voca-count-substrings "hello world"}} | ||
// => {{ voca-count-substrings "bad boys, bad boys whatcha gonna do?" "boys"}} | ||
</code> | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
|
||
<h3>voca-count-where:</h3> | ||
<p>Description for voca-count-where goes here.</p> | ||
<p> | ||
<h3>voca-count-where:</h3> | ||
<hr> | ||
<p>Counts the characters in subject for which predicate returns truthy.</p> | ||
<p> | ||
<code> | ||
\{{ voca-count-where "hello world"}} | ||
\{{ voca-count-where "hola" (voca-is-alpha)}} | ||
</code> | ||
</p> | ||
<p> | ||
</p> | ||
<p> | ||
<code> | ||
// => {{ voca-count-where "hello world"}} | ||
// => {{ voca-count-where "hola" (voca-is-alpha)}} | ||
</code> | ||
</p> | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
|
||
<h3>voca-count-words:</h3> | ||
<p>Description for voca-count-words goes here.</p> | ||
<p> | ||
<h3>voca-count-words:</h3> | ||
<hr> | ||
<p>Count the number of words</p> | ||
<p> | ||
<code> | ||
\{{ voca-count-words "hello world"}} | ||
</code> | ||
</p> | ||
<p> | ||
</p> | ||
<p> | ||
<code> | ||
// => {{ voca-count-words "hello world"}} | ||
</code> | ||
</p> | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
|
||
<h3>voca-grapheme-at:</h3> | ||
<p>Description for voca-grapheme-at goes here.</p> | ||
<p> | ||
<h3>voca-grapheme-at:</h3> | ||
<hr> | ||
<p></p> | ||
<p> | ||
<code> | ||
\{{ voca-grapheme-at "hello world"}} | ||
\{{ voca-grapheme-at '\uD835\uDC00\uD835\uDC01' 0}} | ||
</code> | ||
</p> | ||
<p> | ||
</p> | ||
<p> | ||
<code> | ||
// => {{ voca-grapheme-at "hello world"}} | ||
// => {{ voca-grapheme-at "\uD835\uDC00\uD835\uDC01" 0}} | ||
</code> | ||
</p> | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,33 @@ | ||
|
||
<h3>voca-truncate:</h3> | ||
<p>Description for voca-truncate goes here.</p> | ||
<p> | ||
<h3>voca-truncate:</h3> | ||
<hr> | ||
<p>Truncates subject to a new length.</p> | ||
<p> | ||
<code> | ||
\{{ voca-truncate "hello world"}} | ||
\{{ voca-truncate "Once upon a time" 7}} | ||
</code> | ||
</p> | ||
<p> | ||
</p> | ||
<p> | ||
<code> | ||
// => {{ voca-truncate "hello world"}} | ||
// => {{ voca-truncate "Once upon a time" 7}} | ||
</code> | ||
</p> | ||
</p> | ||
<p> | ||
<code> | ||
\{{ voca-truncate "Good day, Little Red Riding Hood" 14 "(...)"}} | ||
</code> | ||
</p> | ||
<p> | ||
<code> | ||
// => {{ voca-truncate "Good day, Little Red Riding Hood" 14 "(...)"}} | ||
</code> | ||
</p> | ||
<p> | ||
<code> | ||
\{{ voca-truncate "Once upon" 10}} | ||
</code> | ||
</p> | ||
<p> | ||
<code> | ||
// => {{ voca-truncate "Once upon" 10}} | ||
</code> | ||
</p> |