-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add string utils and missing Array docs #11
Conversation
# Conflicts: # packages/kerosene/readme.md # packages/kerosene/src/index.ts
@@ -0,0 +1,11 @@ | |||
const replaceAll = (replaceThis: string, withThis: string, inThis: string): string => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is replaceAll
necessary when we have haystack.replace(/needle/g, replacement)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
technically none of these atomic utils are necessary, but creating a function allows the developer to never need to think of the implementation details.
Plus, putting this in a function makes for nicer FP .map
-ing
No description provided.