-
-
Notifications
You must be signed in to change notification settings - Fork 637
[V3] Poetry Club Door Policy: fix everything around this exercise #1043
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
d309322
Rename strings to poetry-club-door-policy
SleeplessByte b03b03f
Fix importing from the tests
SleeplessByte fb953ef
Fix directory and package name
SleeplessByte d4cfd95
Fix config.json file references
SleeplessByte 96271b9
Add welcome block
SleeplessByte c68c946
Match exemplar with stub
SleeplessByte 2e00cb4
Add design document
SleeplessByte 6dd411e
Add name in config.json
SleeplessByte b68a2ab
Update concept documentation
SleeplessByte 7c63182
Add blurb for strings
SleeplessByte 6832236
Add template literals link
SleeplessByte 2f1096f
Format documents
SleeplessByte 6530848
Apply suggestions from code review
SleeplessByte d6555c4
Change package name to new format
SleeplessByte 1789a7d
[CI] Format code
github-actions[bot] c04d429
Change package name to new format
SleeplessByte File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,10 @@ | ||
[ | ||
{ | ||
"url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String#Instance_methods", | ||
"description": "mdn docs" | ||
"description": "MDN: Strings" | ||
}, | ||
{ | ||
"url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals", | ||
"description": "MDN: Template literals" | ||
} | ||
] |
This file contains hidden or 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 hidden or 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 hidden or 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or 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 hidden or 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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Design | ||
|
||
## Learning objectives | ||
|
||
- String substrings (first, last letter) | ||
- String casing (Word capitalization, normalisation). | ||
- String concatenation | ||
|
||
## Out of scope | ||
|
||
- Codepoints | ||
|
||
## Concepts | ||
|
||
- `strings` | ||
|
||
## Prerequisites | ||
|
||
- `basics` | ||
|
||
## Analyzer | ||
|
||
This exercise could benefit from the following rules added to the the [analyzer][analyzer]: | ||
|
||
- Verify that the `frontDoorResponse` function uses `[0]` or `charAt(0)`. `slice(0, 1)` / `substring(0, 1)` works but is not optimal. | ||
- Verify that the `backDoorResponse` function uses `trim()` or `trimEnd()`, and `[n-1]` or `charAt(n-1)` together with `.length`. | ||
- Verify that the `frontDoorPassword` function uses a helper (like `capitalize`). | ||
- Verify that the `backDoorPassword` function uses a helper (like `capitalize`), and builds the string using `+ ', please` or `${}, please`. | ||
- Verify that the helper (`capitalize`) uses `toUpperCase()` and `slice(1).toLowerCase()`, or `substring(1).toLowerCase()` | ||
|
||
[analyzer]: https://github.com/exercism/javascript-analyzer |
21 changes: 21 additions & 0 deletions
21
exercises/concept/strings/.meta/exemplar.js → ...poetry-club-door-policy/.meta/exemplar.js
This file contains hidden or 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
22 changes: 17 additions & 5 deletions
22
exercises/concept/strings/strings.js → ...pt/poetry-club-door-policy/door-policy.js
This file contains hidden or 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 hidden or 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
4 changes: 2 additions & 2 deletions
4
exercises/concept/strings/package.json → ...cept/poetry-club-door-policy/package.json
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.