Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
ityuany committed Aug 26, 2024
1 parent 33bfaed commit 342a1db
Show file tree
Hide file tree
Showing 57 changed files with 32 additions and 443 deletions.
1 change: 0 additions & 1 deletion __test__/demo/addition/addition.js

This file was deleted.

20 changes: 0 additions & 20 deletions __test__/demo/addition/addition.spec.mjs

This file was deleted.

3 changes: 0 additions & 3 deletions __test__/demo/addition/addition_assignment.js

This file was deleted.

20 changes: 0 additions & 20 deletions __test__/demo/addition/addition_assignment.spec.mjs

This file was deleted.

3 changes: 0 additions & 3 deletions __test__/demo/assignment/assignment.js

This file was deleted.

20 changes: 0 additions & 20 deletions __test__/demo/assignment/assignment.spec.mjs

This file was deleted.

3 changes: 0 additions & 3 deletions __test__/demo/assignment/exponentiation_assignment.js

This file was deleted.

20 changes: 0 additions & 20 deletions __test__/demo/assignment/exponentiation_assignment.spec.mjs

This file was deleted.

11 changes: 0 additions & 11 deletions __test__/demo/await/await.js

This file was deleted.

20 changes: 0 additions & 20 deletions __test__/demo/await/await.spec.mjs

This file was deleted.

9 changes: 0 additions & 9 deletions __test__/demo/await/await_top_level.js

This file was deleted.

22 changes: 0 additions & 22 deletions __test__/demo/await/await_top_level.spec.mjs

This file was deleted.

15 changes: 0 additions & 15 deletions __test__/demo/common.mjs

This file was deleted.

64 changes: 32 additions & 32 deletions __test__/demo/demo.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,50 +2,50 @@ import ava_test from "ava";
import { checkBrowserSupported } from "../../index.js";
import { performance } from "node:perf_hooks";

ava_test(`should to has demo`, (t) => {
const start = performance.now();
// ava_test(`should to has demo`, (t) => {
// const start = performance.now();

const res = checkBrowserSupported("", {
cwd: __dirname,
concurrency: 1,
});
// const res = checkBrowserSupported("", {
// cwd: __dirname,
// concurrency: 1,
// });

res.sort((a, b) => {
return +a.compat.support.chrome > +b.compat.support.chrome ? -1 : 1;
});
// res.sort((a, b) => {
// return +a.compat.support.chrome > +b.compat.support.chrome ? -1 : 1;
// });

console.log(res[0].compat,res[0].compat.support.chrome);
// console.log(res[0].compat,res[0].compat.support.chrome);

console.log(`
您的代码最低可以兼容到 Chrome ${res[0].compat.support.chrome} , Firefox ${res[0].compat.support.firefox} , Safari ${res[0].compat.support.safari} , Edge ${res[0].compat.support.edge} , IE ${res[0].compat.support.ie}
您使用的最新的代码特性为 ${res[0].compat.name} ${res[0].compat.description} ${res[0].compat.tags.join(",")}
// console.log(`
// 您的代码最低可以兼容到 Chrome ${res[0].compat.support.chrome} , Firefox ${res[0].compat.support.firefox} , Safari ${res[0].compat.support.safari} , Edge ${res[0].compat.support.edge} , IE ${res[0].compat.support.ie}
// 您使用的最新的代码特性为 ${res[0].compat.name} ${res[0].compat.description} ${res[0].compat.tags.join(",")}

以下是您的代码片段
// 以下是您的代码片段

${res[0].codeSeg}
// ${res[0].codeSeg}

他位于 ${res[0].start}:${res[0].end}
`);
// 他位于 ${res[0].start}:${res[0].end}
// `);

let mapper = {};
// let mapper = {};



res.map(item => {
if (mapper[item.compat.name]) {
mapper[item.compat.name].push(item);
}else {
mapper[item.compat.name] = [item];
}
})
// res.map(item => {
// if (mapper[item.compat.name]) {
// mapper[item.compat.name].push(item);
// }else {
// mapper[item.compat.name] = [item];
// }
// })

for (const iterator in mapper) {
console.log(iterator, mapper[iterator].length,mapper[iterator][0].compat.support.chrome);
}
// for (const iterator in mapper) {
// console.log(iterator, mapper[iterator].length,mapper[iterator][0].compat.support.chrome);
// }

const end = performance.now();
// const end = performance.now();

console.log(`cost: ${end - start}ms`);
// console.log(`cost: ${end - start}ms`);

t.truthy(true);
});
// t.truthy(true);
// });
1 change: 0 additions & 1 deletion __test__/demo/destructuring/destructuring_array.js

This file was deleted.

5 changes: 0 additions & 5 deletions __test__/demo/destructuring/destructuring_array.spec.mjs

This file was deleted.

1 change: 0 additions & 1 deletion __test__/demo/destructuring/destructuring_assignment.js

This file was deleted.

5 changes: 0 additions & 5 deletions __test__/demo/destructuring/destructuring_assignment.spec.mjs

This file was deleted.

This file was deleted.

This file was deleted.

27 changes: 0 additions & 27 deletions __test__/demo/destructuring/destructuring_for.js

This file was deleted.

5 changes: 0 additions & 5 deletions __test__/demo/destructuring/destructuring_for.spec.mjs

This file was deleted.

1 change: 0 additions & 1 deletion __test__/demo/destructuring/destructuring_object.js

This file was deleted.

5 changes: 0 additions & 5 deletions __test__/demo/destructuring/destructuring_object.spec.mjs

This file was deleted.

This file was deleted.

20 changes: 0 additions & 20 deletions __test__/demo/destructuring/destructuring_rest_in_arrays.spec.mjs

This file was deleted.

This file was deleted.

20 changes: 0 additions & 20 deletions __test__/demo/destructuring/destructuring_rest_in_objects.spec.mjs

This file was deleted.

1 change: 0 additions & 1 deletion __test__/demo/exponentiation/exponentiation.js

This file was deleted.

5 changes: 0 additions & 5 deletions __test__/demo/exponentiation/exponentiation.spec.mjs

This file was deleted.

3 changes: 0 additions & 3 deletions __test__/demo/exponentiation/exponentiation_assignment.js

This file was deleted.

This file was deleted.

Loading

0 comments on commit 342a1db

Please sign in to comment.