author CaoMeiYouRen
 *  date export param { * } obj returns export function jsonDeepParse ( obj ) { try { if ( typeof obj !== 'object' || obj === null ) { return obj ; } const keys = Object . keys ( obj ) ; for ( let i = 0 ; i < keys . length ; i ++ ) { if ( typeof obj [ keys [ i ] ] === 'string' ) { try { if ( obj [ keys [ i ] ] . startsWith ( '{' ) || obj [ keys [ i ] ] . startsWith ( '[' ) ) { obj [ keys [ i ] ] = JSON . parse ( obj [ keys [ i ] ] ) ; } } catch ( error ) { } } } for ( let i = 0 ; i < keys . length ; i ++ ) { if ( typeof obj [ keys [ i ] ] === 'object' ) { obj [ keys [ i ] ] = jsonDeepParse ( obj [ keys [ i ] ] ) ; } } return obj ; } catch ( error ) { return obj ; } } author CaoMeiYouRen
 *  date export param { string } text returns { number } export function getNumber ( text ) { const result = text . match ( /(\d+)/ ) ; if ( result ) { return Number ( result [ 1 ] ) ; } return 0 ; } author CaoMeiYouRen
 *  date export param { string } text export function isNumber ( text ) { return /^\d+$/ . test ( text ) ; } author CaoMeiYouRen
 *  date export param { number } time returns export async function sleep ( time ) { return new Promise ( ( resolve ) => setTimeout ( resolve , time ) ) ; } author CaoMeiYouRen
 *  date export param { string } str returns export function removeHtmlTag ( str ) { return str ? str . replace ( /<[^>]*>/mg , '' ) : str ; } author CaoMeiYouRen
 *  date export param { string } image export function getImageUrl ( image ) { const res = image . matchAll ( /\[CQ:image,file=(.*?)\]/g ) ; return [ ... res ] . map ( ( e ) => ( { cq : e [ 0 ] , url : e [ 1 ] } ) ) ; }