Compare commits
3 Commits
608b1d1b41
...
655af8eec1
Author | SHA1 | Date |
---|---|---|
Kane Wang | 655af8eec1 | |
Kane Wang | 5c0050fe13 | |
Kane Wang | c28c4c7789 |
|
@ -0,0 +1,49 @@
|
||||||
|
"use strict";
|
||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2023-02-10 15:08:53
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @LastEditTime: 2023-02-13 10:04:33
|
||||||
|
* @FilePath: /后端辅助工具/src/DataType/DataType.ts
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
/*eslint no-unused-vars: "off" */
|
||||||
|
/*eslint @typescript-eslint/no-unused-vars: "off" */
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.dataTypes = void 0;
|
||||||
|
//Tuple
|
||||||
|
function dataTypes() {
|
||||||
|
const tu = [1, 1, 2,];
|
||||||
|
const toArray = [1, 2, "3",];
|
||||||
|
const v1 = toArray;
|
||||||
|
const s1 = "string";
|
||||||
|
console.log(typeof s1);
|
||||||
|
let point;
|
||||||
|
point = { x: 0, y: 0, };
|
||||||
|
function addOne(x, y = 1) {
|
||||||
|
return x + y;
|
||||||
|
}
|
||||||
|
console.log(addOne(1));
|
||||||
|
function allParams(x, y) {
|
||||||
|
const z = x + y;
|
||||||
|
}
|
||||||
|
//剩余参数,数组形式
|
||||||
|
function overplusArgusWithArray(x, ...argus) {
|
||||||
|
return argus.length;
|
||||||
|
}
|
||||||
|
function overplusArugsWithTuple(x, ...argus) {
|
||||||
|
console.log(`元组形式的参数表${argus},剩余参数的数量${argus.length}。`);
|
||||||
|
console.log(argus[2]);
|
||||||
|
return argus.length;
|
||||||
|
}
|
||||||
|
overplusArugsWithTuple(1, 2, 3, "test");
|
||||||
|
console.log(overplusArgusWithArray(1, 2, 3, 4, 5, 6, 7, 8, 9, 10));
|
||||||
|
//测试null
|
||||||
|
const nulltest = null;
|
||||||
|
let var_2 = { x: "test", };
|
||||||
|
// var_2 = null;
|
||||||
|
}
|
||||||
|
exports.dataTypes = dataTypes;
|
||||||
|
//# sourceMappingURL=DataType.js.map
|
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"DataType.js","sourceRoot":"","sources":["../../src/DataType/DataType.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;AACH,iCAAiC;AACjC,oDAAoD;;;AAGpD,OAAO;AACP,SAAS,SAAS;IAEd,MAAM,EAAE,GAAsC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;IAEzD,MAAM,OAAO,GAA6B,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC;IACvD,MAAM,EAAE,GAAwB,OAAO,CAAC;IAExC,MAAM,EAAE,GAAG,QAAQ,CAAC;IAEpB,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;IAGvB,IAAI,KAGH,CAAC;IACF,KAAK,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC;IAExB,SAAS,MAAM,CAAC,CAAS,EAAE,IAAY,CAAC;QAEpC,OAAO,CAAC,GAAG,CAAC,CAAC;IACjB,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAEvB,SAAS,SAAS,CAAC,CAAS,EAAE,CAAS;QAEnC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACpB,CAAC;IAED,WAAW;IACX,SAAS,sBAAsB,CAAC,CAAS,EAAE,GAAG,KAAe;QAEzD,OAAO,KAAK,CAAC,MAAM,CAAC;IACxB,CAAC;IAED,SAAS,sBAAsB,CAAC,CAAS,EAAE,GAAG,KAA+B;QAGzE,OAAO,CAAC,GAAG,CAAC,WAAW,KAAK,WAAW,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;QACxD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAEtB,OAAO,KAAK,CAAC,MAAM,CAAC;IACxB,CAAC;IAED,sBAAsB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;IAExC,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAEnE,QAAQ;IACR,MAAM,QAAQ,GAAS,IAAI,CAAC;IAC5B,IAAI,KAAK,GAAmB,EAAE,CAAC,EAAE,MAAM,GAAG,CAAC;IAE3C,gBAAgB;AACpB,CAAC;AAGQ,8BAAS"}
|
|
@ -0,0 +1,3 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
//# sourceMappingURL=AxiosTest.js.map
|
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"AxiosTest.js","sourceRoot":"","sources":["../../src/axios/AxiosTest.ts"],"names":[],"mappings":""}
|
|
@ -0,0 +1,8 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
// const service = axios.create({
|
||||||
|
// baseURL: "",
|
||||||
|
// timeout: 10000,
|
||||||
|
// timeoutErrorMessage: "请求超时!",
|
||||||
|
// });
|
||||||
|
//# sourceMappingURL=request.js.map
|
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../src/axios/request.ts"],"names":[],"mappings":";;AAYA,iCAAiC;AACjC,mBAAmB;AACnB,sBAAsB;AACtB,oCAAoC;AACpC,MAAM"}
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"PakoTest.js","sourceRoot":"","sources":["../../src/gzip/PakoTest.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AAEH,+BAAwC;AACxC,0DAAgF;AAEhF,SAAS,QAAQ;IAEb,MAAM,QAAQ,GAAW,4pIAA4pI,CAAC;IACtrI,MAAM,OAAO,GAAG,IAAA,kCAAkB,EAAC,QAAQ,CAAC,CAAC;IAE7C,MAAM,UAAU,GAAG,IAAA,cAAO,EAAC,OAAO,CAAC,CAAC;IACpC,MAAM,YAAY,GAAG,IAAA,kCAAkB,EAAC,IAAA,cAAO,EAAC,UAAU,CAAC,CAAC,CAAC;IAE7D,OAAO,CAAC,GAAG,CAAC,SAAS,UAAU,EAAE,CAAC,CAAC;IACnC,uCAAuC;AAC3C,CAAC;AAEQ,4BAAQ"}
|
|
@ -0,0 +1,19 @@
|
||||||
|
"use strict";
|
||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2023-02-09 22:14:30
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @LastEditTime: 2023-02-14 00:09:39
|
||||||
|
* @FilePath: /后端辅助工具/src/main.ts
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
const PakoTest_1 = require("./gzip/PakoTest");
|
||||||
|
const greetings = "hello, this is kane's typescript!";
|
||||||
|
console.log(greetings);
|
||||||
|
console.log("all");
|
||||||
|
//dataTypes();
|
||||||
|
(0, PakoTest_1.pakoTest)();
|
||||||
|
//# sourceMappingURL=main.js.map
|
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;AAGH,8CAA2C;AAE3C,MAAM,SAAS,GAAG,mCAAmC,CAAC;AAEtD,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;AACvB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAEnB,cAAc;AACd,IAAA,mBAAQ,GAAE,CAAC"}
|
|
@ -0,0 +1,31 @@
|
||||||
|
"use strict";
|
||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2023-02-13 14:54:46
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @LastEditTime: 2023-02-13 14:55:19
|
||||||
|
* @FilePath: /pako/src/utils/StringConverter.js
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.stringToUint8Array = exports.Uint8ArrayToString = void 0;
|
||||||
|
function Uint8ArrayToString(fileData) {
|
||||||
|
let dataString = "";
|
||||||
|
for (let i = 0; i < fileData.length; i++) {
|
||||||
|
dataString += String.fromCharCode(fileData[i]);
|
||||||
|
}
|
||||||
|
return dataString;
|
||||||
|
}
|
||||||
|
exports.Uint8ArrayToString = Uint8ArrayToString;
|
||||||
|
function stringToUint8Array(str) {
|
||||||
|
const arr = [];
|
||||||
|
for (let i = 0, j = str.length; i < j; ++i) {
|
||||||
|
arr.push(str.charCodeAt(i));
|
||||||
|
}
|
||||||
|
const tmpUint8Array = new Uint8Array(arr);
|
||||||
|
return tmpUint8Array;
|
||||||
|
}
|
||||||
|
exports.stringToUint8Array = stringToUint8Array;
|
||||||
|
//# sourceMappingURL=StringConvert.js.map
|
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"StringConvert.js","sourceRoot":"","sources":["../../src/utils/StringConvert.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AAEH,SAAS,kBAAkB,CAAC,QAAoB;IAE5C,IAAI,UAAU,GAAW,EAAE,CAAC;IAE5B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EACxC;QACI,UAAU,IAAI,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;KAClD;IAED,OAAO,UAAU,CAAC;AACtB,CAAC;AAgBQ,gDAAkB;AAd3B,SAAS,kBAAkB,CAAC,GAAW;IAEnC,MAAM,GAAG,GAAa,EAAE,CAAC;IAEzB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,EAC1C;QACI,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;KAC/B;IAED,MAAM,aAAa,GAAe,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC;IAEtD,OAAO,aAAa,CAAC;AACzB,CAAC;AAE4B,gDAAkB"}
|
|
@ -14,7 +14,7 @@
|
||||||
"strict": false,
|
"strict": false,
|
||||||
"strictNullChecks": true,
|
"strictNullChecks": true,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"allowJs":true,
|
"allowJs": true,
|
||||||
"checkJs": false,
|
"checkJs": false,
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"module": "CommonJS",
|
"module": "CommonJS",
|
||||||
|
|
Loading…
Reference in New Issue