Skip to content

Commit

Permalink
修复使用中的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
akolhu committed Sep 30, 2024
1 parent 0259bcf commit 5054f77
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// <reference types="babel__traverse" />
/// <reference types="node" />

import * as c from 'chalk';
import { default as c } from 'chalk';
import execa from 'execa';
import * as fetch_2 from 'node-fetch';
import * as fse from 'fs-extra';
Expand Down
3 changes: 1 addition & 2 deletions dist/utils.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ function _interopNamespace(e) {
}

var c__default = /*#__PURE__*/_interopDefaultLegacy(c);
var c__namespace = /*#__PURE__*/_interopNamespace(c);
var fse__default = /*#__PURE__*/_interopDefaultLegacy(fse);
var fse__namespace = /*#__PURE__*/_interopNamespace(fse);
var fetch__default = /*#__PURE__*/_interopDefaultLegacy(fetch);
Expand Down Expand Up @@ -786,7 +785,7 @@ class DDWebhook {
// .then(console.log)
// .catch(console.log);

exports.c = c__namespace;
exports.c = c__default;
exports.fse = fse__namespace;
exports.fetch = fetch__namespace;
exports.DDWebhook = DDWebhook;
Expand Down
43 changes: 43 additions & 0 deletions num.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
function circlePrint(arr, n) {
const res = [];
const rows = arr.length;
const cols = arr[0].length;
const topArr = arr[n];
const botArr = arr[rows - n - 1];

const arr1 = [];
for (let i = n; i <= cols - n - 1; i++) {
arr1.push(topArr[i]);
}
console.log(arr1);

const arr2 = [];
for (let i = n + 1; i <= rows - n - 1 -1; i++) {
arr2.push(arr[i][cols - n - 1]);
}
console.log(arr2);

const arr3 = [];
for (let i = n; i <= cols - n - 1; i++) {
arr3.push(botArr[i]);
}
console.log(arr3.reverse());

const leftArr = [];
for (let i = n + 1; i <= rows - n - 1 - 1; i++) {
leftArr.push(arr[i][n]);
}
console.log(leftArr.reverse());

// return res.concat(leftArr.reverse());
}

const arr = [
[1, 34, 23, 2, 11],
[2, 41, 213, 21, 111],
[11, 134, 123, 12, 121],
[1111, 12234, 1223, 122, 1212],
[151, 534, 253, 25, 115],
]

circlePrint(arr, 1)
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@all-in-js/utils",
"version": "1.1.1",
"version": "1.1.3",
"author": "famanoder",
"license": "MIT",
"publishConfig": {
Expand All @@ -9,13 +9,16 @@
},
"main": "./dist/utils.cjs.js",
"types": "./dist/index.d.ts",
"files": ["dist"],
"files": [
"dist"
],
"repository": {
"type": "git",
"url": "https://github.com/all-in-js/utils"
},
"scripts": {
"build": "node ./scripts/build.js"
"build": "node ./scripts/build.js",
"prepublishOnly": "rm -rf dist && npm run build"
},
"devDependencies": {
"@microsoft/api-extractor": "^7.9.15",
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import * as c from 'chalk';
import { default as c } from 'chalk';
import * as fse from 'fs-extra';
import * as fetch from 'node-fetch';

Expand Down

0 comments on commit 5054f77

Please sign in to comment.