ez vcard
0.1.6
它是用打字稿編寫的nodejs編寫的VCARD生成器,它使用Java編寫的驚人的EZ-VCARD庫。它可以以許多不同的格式讀寫vcard。 “ EZ”代表“簡單”,因為目標是創建一個易於使用的庫。
sudo apt install default-jdksudo apt install build-essential安裝make and g++npm i ez-vcard const ezVcard = require ( 'ez-vcard' ) . default ;
( async ( ) => {
const vcard = await ezVcard ( { name : { first : 'Maxim' } } ) ;
console . log ( vcard ) ;
} ) ( ) ;npm install @types/node typescriptsrc/vcard.ts
import ezVcard from 'ez-vcard' ;
( async ( ) => {
const vcard = await ezVcard ( { name : { first : 'Maxim' } } ) ;
console . log ( vcard ) ;
} ) ( ) ;tsconfig.json
{
"compilerOptions" : {
"esModuleInterop" : true
}
}並運行: npx ts-node src/vcard.ts或編譯: npx tsc --outDir dist 。
注意:第一次運行可能需要一段時間,因為它下載了包裝運行所需的Maven軟件包。隨後的運行將比第一個運行快得多。