Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
baidu-fanyi-api
Advanced tools
本项目仅供学习参考
baidu-fanyi-api
npm i baidu-fanyi-api
BaiduFanyiAPI
import { BaiduFanyiAPI } from 'baidu-fanyi-api';
const api = new BaiduFanyiAPI();
async function main() {
await api.init();
const data = await api.translate('我的', 'zh', 'en');
console.log(data);
}
main();
所有操作必须在init之后执行
await api.translate('你好', 'zh', 'en');
await api.langdetect('你好');
await api.suggest('你好');
const image = createReadStream(join(__dirname, '../img.png'));
const data = await api.getOCR(image, 'en', 'en');
const steam = createWriteStream(join(__dirname, '../tts.mp3'));
const data = await api.getTTS('你好!,我是一个机器人。', 'zh');
data.pipe(steam);
FAQs
百度翻译API
The npm package baidu-fanyi-api receives a total of 0 weekly downloads. As such, baidu-fanyi-api popularity was classified as not popular.
We found that baidu-fanyi-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.