npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gdog-tg-share

v1.4.0

Published

G.dog Telegram Share Images.

Downloads

37

Readme

gdog-Tg-share

NPM version

token share Demo token

images

const {TokenShare} = require('gdog-tg-share');

const tokenInfo = {
    "price": 0.000011783288298661556,
    "token_decimals": 18,
    "token_name": "Pepe",
    "token_symbol": "PEPE",
    ...
};

const chartData = [
    {
        "price": 0.000011397883896766809,
        "timestamp": "2024-07-16T08:00:00.000Z"
    },
    {
        "price": 0.00001192862732773498,
        "timestamp": "2024-07-16T09:00:00.000Z"
    },
    {
        "price": 0.00001212820984628874,
        "timestamp": "2024-07-16T10:00:00.000Z"
    },
    ...
];

const summary = {
    "summary": "根据G.DOG的AI分析,这个币可能包含了深厚的meme文化和社区元素。Pepe(PEPE)借用了广受欢迎的Pepe the Frog的形象,这个形象在互联网meme文化中有很高的辨识度和影响力。官网声称$PEPE旨在取代其他流行的meme币,打造“最具meme潜力的memecoin”。该币无预售、无税收,且LP已被烧毁,合约已放弃控制,旨在通过其memetic力量吸引社区关注。虽然没有实际价值或回报预期,但强大的文化认同可能推动其社交媒体上的热度。This token has a relatively long issuance time, the contract code is open-source (owner renounced), liquidity is sufficient (locked), trading volume is active, tax rate is 0%, social media topics are very active, overall risk assessment level is low."
};

(async () => {
    const tokenShare = new TokenShare({
        // language = en | zh
        language: 'en',
    });
    await tokenShare.initBg();

    await tokenShare.clearData();
    // 设置title potential | trending, 默认 trending
    await tokenShare.setTokenInfo(tokenInfo, 'potential');
    await tokenShare.setChart(chartData);
    // 0 表示显示全部AI分析内容, >= 3表示显示多少行, 至少3行
    await tokenShare.setSummaryData(summary, 0);
    
    // 增加导出PNG 压缩级别和过滤器设置
    // compressionLevel = 1~9 默认 9, 1-3 快速, 4-6 最佳质量, 7-9 平衡
    // 默认 PNG_FILTER_AVG,filters = PNG_FILTER_NONE | PNG_FILTER_SUB | PNG_FILTER_UP | PNG_FILTER_AVG | PNG_FILTER_PAETH | PNG_ALL_FILTERS
    const PNGBuffer = await tokenShare.getPNGBuffer({
        compressionLevel: 9,
        filters: tokenShare.canvas.PNG_FILTER_AVG,
    });
    
    // 增加导出JPEG buffer,  quality 压缩质量设置 0~1, 1=最高质量
    const JPEGBuffer = await tokenShare.getJPEGBuffer({
        quality: 0.95
    })
    console.log(JPEGBuffer);
})()