Repository navigation
Simple builtin additions to String and Array functions - #1669
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## develop #1669 +/- ##
===========================================
+ Coverage 74.00% 74.09% +0.09%
===========================================
Files 93 93
Lines 5112 5134 +22
Branches 861 865 +4
===========================================
+ Hits 3783 3804 +21
- Misses 1304 1305 +1
Partials 25 25 see 5 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
|
Also should close: #843 |
|
Could we also have List.append? Shouldn't be that different from List.join. |
I'm unsure about this. JS allows this, but Python doesn't ( I don't see anything terrible about this specific feature, though, just worried that having too many implicit casting features like this eventually combine into wats. So it seems safer to implement this only for strings for now. Same concern about Note: string interpolation support to Squiggle ( |
I'll do this in a different PR, is easy enough. |
|
I changed it so that I think I want to keep the |
| get(key: Value) { | ||
| if (key.type === "Number") { | ||
| const index = key.value | 0; // TODO - fail on non-integer indices? | ||
| if (!isInteger(key.value)) { |
There was a problem hiding this comment.
I wanted to recommend Number.isInteger in place of lodash here, as I often do, but I benchmarked both versions and the performance is the same, so it doesn't matter.
This does a few things:
"foo" + "bar" + normal(3,3)I wasn't sure about some of this, happy to accept comments/suggestions.
This closes #1614
Also, this closes the comment to #1327