@qingfu/core-env 0.4.6 → 0.5.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.
- package/aa.js +9 -0
- package/lib/utils.js +2 -2
- package/package.json +9 -9
package/aa.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const pinyin = require( 'pinyin' ).default;
|
|
2
|
+
const _ = require( 'lodash' );
|
|
3
|
+
|
|
4
|
+
const generatePinyin = string => {
|
|
5
|
+
let options = { style: pinyin.STYLE_NORMAL };
|
|
6
|
+
return _.flatten( pinyin( string, options )).join( ' ' ).toUpperCase();
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
console.log( generatePinyin('我爱北京天安门'))
|
package/lib/utils.js
CHANGED
|
@@ -3,8 +3,8 @@ const _ = require( 'lodash' );
|
|
|
3
3
|
const crypto = require( 'crypto' );
|
|
4
4
|
const xml2js = require( 'xml2js' );
|
|
5
5
|
const xlsx = require( 'xlsx' );
|
|
6
|
-
const baseX = require( 'base-x' );
|
|
7
|
-
const pinyin = require( 'pinyin' );
|
|
6
|
+
const baseX = require( 'base-x' ).default;
|
|
7
|
+
const pinyin = require( 'pinyin' ).default;
|
|
8
8
|
const qrcode = require( 'qr-image' );
|
|
9
9
|
const request = require( 'superagent' );
|
|
10
10
|
const utils = global.utils = module.exports = {};
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qingfu/core-env",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"readmeFilename": "README.md",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@koa/cors": "5.0.0",
|
|
7
|
-
"@koa/router": "
|
|
8
|
-
"base-x": "
|
|
9
|
-
"bull": "4.16.
|
|
10
|
-
"bullmq": "5.12.
|
|
7
|
+
"@koa/router": "13.0.0",
|
|
8
|
+
"base-x": "5.0.0",
|
|
9
|
+
"bull": "4.16.3",
|
|
10
|
+
"bullmq": "5.12.15",
|
|
11
11
|
"busboy": "1.6.0",
|
|
12
12
|
"cookie": "0.6.0",
|
|
13
13
|
"dotenv-extended": "2.9.0",
|
|
@@ -28,18 +28,18 @@
|
|
|
28
28
|
"mongoose-geojson-schema": "2.2.5",
|
|
29
29
|
"mongoose-lean-defaults": "2.2.1",
|
|
30
30
|
"mongoose-lean-getters": "2.1.1",
|
|
31
|
-
"mongoose-lean-virtuals": "0.
|
|
31
|
+
"mongoose-lean-virtuals": "1.0.0",
|
|
32
32
|
"ms": "2.1.3",
|
|
33
33
|
"notepack.io": "3.0.1",
|
|
34
|
-
"pinyin": "
|
|
34
|
+
"pinyin": "3.1.0",
|
|
35
35
|
"primus": "8.0.9",
|
|
36
36
|
"primus-rooms": "3.4.3",
|
|
37
37
|
"qr-image": "3.2.0",
|
|
38
|
-
"superagent": "
|
|
38
|
+
"superagent": "10.1.0",
|
|
39
39
|
"wechat-encrypt": "1.1.1",
|
|
40
40
|
"winston": "3.14.2",
|
|
41
41
|
"winston-mongodb": "5.1.1",
|
|
42
42
|
"xlsx": "0.18.5",
|
|
43
|
-
"xml2js": "0.
|
|
43
|
+
"xml2js": "0.6.2"
|
|
44
44
|
}
|
|
45
45
|
}
|