summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/split-on-first/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/split-on-first/index.js')
-rw-r--r--deps/npm/node_modules/split-on-first/index.js22
1 files changed, 0 insertions, 22 deletions
diff --git a/deps/npm/node_modules/split-on-first/index.js b/deps/npm/node_modules/split-on-first/index.js
deleted file mode 100644
index d9140706dd..0000000000
--- a/deps/npm/node_modules/split-on-first/index.js
+++ /dev/null
@@ -1,22 +0,0 @@
-'use strict';
-
-module.exports = (string, separator) => {
- if (!(typeof string === 'string' && typeof separator === 'string')) {
- throw new TypeError('Expected the arguments to be of type `string`');
- }
-
- if (separator === '') {
- return [string];
- }
-
- const separatorIndex = string.indexOf(separator);
-
- if (separatorIndex === -1) {
- return [string];
- }
-
- return [
- string.slice(0, separatorIndex),
- string.slice(separatorIndex + separator.length)
- ];
-};