Skip to content

Commit

Permalink
chore: chore lint
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Sep 9, 2022
1 parent f69caa7 commit b3e538b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
16 changes: 8 additions & 8 deletions bench/index.bench.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { describe, bench } from 'vitest'
import { stripLiteralAcorn, stripLiteralRegex } from '../src'
import { readFile } from 'fs/promises'
import { bench, describe } from 'vitest'
import { stripLiteralAcorn, stripLiteralRegex } from '../src'

const modules = {
'vue-global': './node_modules/vue/dist/vue.runtime.global.js',
'three': './node_modules/three/build/three.module.js'
'three': './node_modules/three/build/three.module.js',
}

Object.entries(modules).map(([name, path]) => {
describe('bench ' + name, async () => {
let code = await readFile(path, 'utf-8')
bench('regex', ()=>{
Object.entries(modules).forEach(([name, path]) => {
describe(`bench ${name}`, async () => {
const code = await readFile(path, 'utf-8')
bench('regex', () => {
stripLiteralRegex(code)
})
bench('acorn', ()=>{
bench('acorn', () => {
stripLiteralAcorn(code)
})
})
Expand Down
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,32 @@
"version": "0.4.0",
"packageManager": "pnpm@7.0.0",
"description": "Strip comments and string literals from JavaScript code",
"keywords": [],
"homepage": "https://github.com/antfu/strip-literal#readme",
"bugs": {
"url": "https://github.com/antfu/strip-literal/issues"
},
"license": "MIT",
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
"license": "MIT",
"funding": "https://github.com/sponsors/antfu",
"homepage": "https://github.com/antfu/strip-literal#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/antfu/strip-literal.git"
},
"funding": "https://github.com/sponsors/antfu",
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"bugs": {
"url": "https://github.com/antfu/strip-literal/issues"
},
"keywords": [],
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/index.cjs",
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts"
"import": "./dist/index.mjs"
}
},
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"sideEffects": false,
"scripts": {
"build": "unbuild",
"dev": "unbuild --stub",
Expand Down

0 comments on commit b3e538b

Please sign in to comment.