Izmjenjena struktura, dodan backand

This commit is contained in:
GotPPay
2017-10-16 11:19:46 +02:00
parent 1ec88afacb
commit 048e32c4aa
37153 changed files with 2975854 additions and 1 deletions

19
web/node_modules/jsx-ast-utils/__tests__/helper.js generated vendored Normal file
View File

@@ -0,0 +1,19 @@
import getProp from '../src/getProp';
const acorn = require('acorn-jsx');
function parse(code) {
return acorn.parse(code, {
plugins: { jsx: true },
});
}
export function getOpeningElement(code) {
return parse(code).body[0].expression.openingElement;
}
export function extractProp(code, prop = 'foo') {
const node = getOpeningElement(code);
const { attributes: props } = node;
return getProp(props, prop);
}