Fragments: allow fragmentPrefix to define the entire delimiter
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6.2k
- Forks
- 468
- PR merge metrics
- No merged PRs in 30d
Description
Bear with my pseudo-code for the sake of example. fragmentPrefix currently behaves something like this
var _rootPrefix = '#';
var _actualPrefix = _rootPrefix;
function fragmentPrefix( value ){
_actualPrefix = _rootPrefix + value;
var parts = this.toString().split( _actualPrefix );
var uriProper = parts[ 0 ];
var fragment = parts[ 1 ];
}
The way I'd like to see this work is to eliminate what I've called _rootPrefix above and just delimit with the supplied value. This would allow my current use case of working with Mithril, whose default SPA routing mode is to split on the search ?.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the fragmentPrefix implementation and compare its current delimiter handling with the pseudo-code in the issue. Verify that a supplied value such as ? can act as the complete delimiter, including the Mithril routing use case, and confirm the existing fragment behavior remains covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- web-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100