2
0
mirror of https://github.com/tenrok/BBob.git synced 2026-06-17 19:21:20 +03:00

feat: update core deps (#120)

* feat: use swc.rs instead of babel

* BREAKING CHANGE: now we use swc.rs as main bundler and transpiler instead of babel
  - jest now uses swc
  - rollup now uses swc

* feat: benchmark now separate package with `npm start` and colored output
  - benchmark as separate package with error throw if package drops performance

* feat: all lerna packages now using scripts/pkg-task

* feat(github): publish to npm and github registry
  - when release was created this action automaticly publish packages to npm and github

* feat(github): move all from Travis CI to Github Actions
  - code analysis and tests now using github actions

* test: increase tests coverage
  - add more tests for @bbob/react, @bbob/vue2 and @bbob/parser
This commit is contained in:
Nikolay Kostyurin
2021-11-29 00:33:06 +02:00
committed by GitHub
parent 86d1dde106
commit da6709d437
66 changed files with 12410 additions and 20669 deletions
+3 -8
View File
@@ -2,7 +2,7 @@
const isObj = (value) => (typeof value === 'object');
const isBool = (value) => (typeof value === 'boolean');
function iterate(t, cb) {
export function iterate(t, cb) {
const tree = t;
if (Array.isArray(tree)) {
@@ -16,7 +16,7 @@ function iterate(t, cb) {
return tree;
}
function same(expected, actual) {
export function same(expected, actual) {
if (typeof expected !== typeof actual) {
return false;
}
@@ -45,7 +45,7 @@ function same(expected, actual) {
});
}
function match(expression, cb) {
export function match(expression, cb) {
return Array.isArray(expression)
? iterate(this, (node) => {
for (let idx = 0; idx < expression.length; idx++) {
@@ -58,8 +58,3 @@ function match(expression, cb) {
})
: iterate(this, (node) => (same(expression, node) ? cb(node) : node));
}
export {
iterate,
match,
};