-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(remove-from): rename removeString and fix unit tests
- Loading branch information
1 parent
ecf9376
commit 883c90e
Showing
8 changed files
with
34 additions
and
65 deletions.
There are no files selected for viewing
This file contains 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 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 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,7 +1,5 @@ | ||
const getEasterEgg = require("./util/getEasterEgg"); | ||
const removeString = require("./util/removeString"); | ||
const removeFrom = require("./util/removeFrom"); | ||
|
||
module.exports = { | ||
getEasterEgg, | ||
removeString | ||
removeFrom | ||
}; |
This file contains 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 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 was deleted.
Oops, something went wrong.
This file contains 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,23 @@ | ||
/** | ||
* | ||
* Summary - Remove from `x` all of `y` | ||
* | ||
* Description - This method removes | ||
* all occurrences of *string* `y` from *string* `x` | ||
* | ||
* @name removeFrom | ||
* | ||
* @param {string} x - string | ||
* @param {string} y - string | ||
* | ||
* @since 1.0.0 | ||
* @access public | ||
* | ||
* @return `x` with all occurrences of `y` removed | ||
*/ | ||
|
||
module.exports = (x, y) => { | ||
return typeof x === "string" && typeof y === "string" | ||
? x.split(y).join("") | ||
: new Error("Both inputs are not of type string"); | ||
}; |
This file was deleted.
Oops, something went wrong.