2
0
mirror of https://github.com/tenrok/BBob.git synced 2026-05-15 11:59:37 +03:00

chore(benchmark): add ya-bbcode as benchmark target in benchmark suite (#62)

This commit is contained in:
Nikolay Kostyurin
2020-04-05 17:50:49 +02:00
committed by GitHub
parent 97ecba0af6
commit 22237c4500
3 changed files with 621 additions and 367 deletions
+15 -6
View File
@@ -9,16 +9,25 @@ suite
closable: true,
},
}))
.add('ya-bbcode', () => {
const Yabbcode = require('ya-bbcode');
const parser = new Yabbcode();
parser.clearTags();
parser.registerTag('ch', {
type: 'replace',
open: () => '<div>',
close: () => '</div>',
});
return parser.parse(stub);
})
.add('xbbcode/parser', () => {
const xbbcode = require('xbbcode-parser');
xbbcode.addTags({
ch: {
openTag(params, content) {
return '<div>';
},
closeTag(params, content) {
return '</div>';
},
openTag: () => '<div>',
closeTag: () => '</div>',
restrictChildrenTo: [],
},
});
+604 -360
View File
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -51,7 +51,8 @@
"rollup-plugin-babel": "4.3.3",
"rollup-plugin-terser": "5.2.0",
"size-limit": "3.0.0",
"xbbcode-parser": "0.1.2"
"xbbcode-parser": "0.1.2",
"ya-bbcode": "1.0.12"
},
"publishConfig": {
"access": "public",