vsu-utils-dongbangxin 1.0.0

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.
Files changed (2) hide show
  1. package/index.js +16 -0
  2. package/package.json +13 -0
package/index.js ADDED
@@ -0,0 +1,16 @@
1
+ // 首字母大写
2
+ function capitalize(str) {
3
+ if (typeof str !== 'string') return '';
4
+ return str.charAt(0).toUpperCase() + str.slice(1);
5
+ }
6
+
7
+ // 去两端空格
8
+ function trim(str) {
9
+ return str.trim();
10
+ }
11
+
12
+ // 导出函数
13
+ module.exports = {
14
+ capitalize,
15
+ trim
16
+ };
package/package.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "vsu-utils-dongbangxin",
3
+ "version": "1.0.0",
4
+ "description": "VSU study utils",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "keywords": [],
10
+ "author": "Дун Бансинь",
11
+ "license": "MIT",
12
+ "type": "commonjs"
13
+ }