@vnejs/helpers.split-line-keywords 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +8 -0
- package/package.json +17 -0
package/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export const splitLineKeywords = (text) => {
|
|
2
|
+
const [dollar, module, ...other] = text.split(" ");
|
|
3
|
+
const indexKeywords = other.indexOf("|");
|
|
4
|
+
|
|
5
|
+
return indexKeywords === -1
|
|
6
|
+
? { module, line: other.join(" "), keywords: [] }
|
|
7
|
+
: { module, line: other.slice(0, indexKeywords).join(" "), keywords: other.slice(indexKeywords + 1) };
|
|
8
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vnejs/helpers.split-line-keywords",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
8
|
+
"publish:major:plugin": "npm run publish:major",
|
|
9
|
+
"publish:minor:plugin": "npm run publish:minor",
|
|
10
|
+
"publish:patch:plugin": "npm run publish:patch",
|
|
11
|
+
"publish:major": "npm version major && npm publish --access public",
|
|
12
|
+
"publish:minor": "npm version minor && npm publish --access public",
|
|
13
|
+
"publish:patch": "npm version patch && npm publish --access public"
|
|
14
|
+
},
|
|
15
|
+
"author": "",
|
|
16
|
+
"license": "ISC"
|
|
17
|
+
}
|