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软件包。随后的运行将比第一个运行快得多。