jayphelps / jayphelps/string.interpolate.js

InterpolatedString's do not have complete String-like behavior

Open
#1 0 comments 0 reactions 1 assignee View on GitHub

@jayphelps is already working on this.

Since Jul 5, 2013.

bug
Dominant language
JavaScript
Stars
2
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Instances of `InterpolatedString` are not `Strings` and do not correctly inherit all of `Strings` behaviors, like being able to use brackets to access characters.

``` javascript
// Current, incorrect behavior
'test'.interpolate({})[0] === undefined

// Correct, future behavior
'test'.interpolate({})[0] === 't'

// This currently works though
'test'.interpolate({}).charAt(0) === 't'

// Length is incorrect as well, this is the current result
'test'.interpolate({}).length === 0
```

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.