Export function merge

Time:2021-11-22
a.js
export function aa() {}

b.js
export function bb() {}

index.js
export * from a.js
export * from b.js

main.js
import * as pubJS from index.js
//The loop can be added to the Vue prototype

Recommended Today

An example of PHP transforming XML into objects

XML file $xml= “123456”; Convert files to objects $objectxml = simplexml_load_string($xml); Convert object to JSON $xmljson= json_encode($objectxml ); Convert JSON to array $xmlarray=json_decode($xmljson,true); Content extension: PHP converts XML into arrays / objects $xml= “<xml><appid>123456</appid></xml>”;// XML file $objectxml = simplexml_ load_ string($xml);// Convert files to objects $xmljson= json_ encode($objectxml );// Convert object to JSON $xmlarray=json_ decode($xmljson,true);// […]