-
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 substring helpers to have arguments
- Loading branch information
Showing
3 changed files
with
36 additions
and
15 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 |
---|---|---|
|
@@ -8,12 +8,23 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
|
||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
- name: Pnpm setup | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 4.11.1 | ||
run_install: | | ||
- recursive: true | ||
args: [--frozen-lockfile, --strict-peer-dependencies] | ||
- name: Build | ||
run: | | ||
npm install | ||
npm run build | ||
pnpm run build | ||
- name: Deploy | ||
uses: JamesIves/github-pages-deploy-action@releases/v3 | ||
with: | ||
|
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 { substring } from 'voca'; | ||
|
||
export default helper(function vocaSubstring(params/*, hash */ ) { | ||
return substring(params[0]); | ||
export default helper(function vocaSubstring(params ) { | ||
return substring(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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,23 @@ | ||
|
||
<h3>voca-substring:</h3> | ||
<p>Description for voca-substring goes here.</p> | ||
<p> | ||
<h3>voca-substring:</h3> | ||
<hr> | ||
<p>Extracts from subject a string from start position up to end position. The character at end position is not included.</p> | ||
<p> | ||
<code> | ||
\{{ voca-substring "hello world"}} | ||
\{{ voca-substring "beach" 1}} | ||
</code> | ||
</p> | ||
<p> | ||
</p> | ||
<p> | ||
<code> | ||
// => {{ voca-substring "hello world"}} | ||
// => {{ voca-substring "beach" 1}} | ||
</code> | ||
</p> | ||
</p> | ||
<p> | ||
<code> | ||
\{{ voca-substring "ocean" 1 3}} | ||
</code> | ||
</p> | ||
<p> | ||
<code> | ||
// => {{ voca-substring "ocean" 1 3}} | ||
</code> | ||
</p> |