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 🙏

© 2025 – Pkg Stats / Ryan Hefner

log2im

v1.0.134

Published

log anything into IM(Telgram, Discord, LineBot)

Downloads

60

Readme

Log2IM (Telegram, Discord, LINE, imgur, Notion)

  • small. use native node lib, no other needs.
  • send anything to your IM realtime as log.
    • if u like u can add it to anywhere not just as log
    • one line send to All IM(Telegram, Discord, LINE, imgur)
  • https://www.npmjs.com/package/log2im
  • tool from https://decade.tw

Usage

npm install log2im
const {Log2im} = require("log2im/log2im.js");
// Run the tests
try {
    // Option 1: Use config object
    // const log2IM = new Log2im(log2IM_Config);

    // Option 2: Use .env file
    const log2IM = new Log2im();

    log2IM.sendToDiscord({text: 'send2discord', image_file: '/Users/x/Pictures/D.png'}).then((r) => {
        log2IM.history()
    })
    log2IM.sendToTelegram({text: 'send2telegram', image_file: '/Users/x/Pictures/D.png'}).then((r) => {
        log2IM.history()
    })
    log2IM.sendToIMGUR({text: 'imgur_title', image_file: '/Users/x/Pictures/D.png'}).then((r) => {
        log2IM.history()
    })
    log2IM.sendToLineMessaging({text: 'send2line'}).then((r) => {
        log2IM.history()
    })

    // Send to Notion with an image file
    log2IM.sendToNotion({
        text: 'Test Notion message',
        image_file: '/Users/x/Pictures/D.png'
    }).then((r) => {
        console.log('Notion response:', r);
    });

    const results = log2IM.sendToAll(log2IM_Config);
} catch (error) {
    console.error('Error in testSendToAllLineNotify:', error.message);
}

Method1 - Config use obj


const log2IM_Config = {
    text: `wahaha@${Date.now()}`,
    image_url: 'https://www.decade.tw/wp-content/uploads/2021/09/DECADE_new.png',
    image_file: '/Users/x/Pictures/D.png',

    line: {token: 'must_need'},
    telegram: {token: 'must_need', chatid: 'must_need'},
    discord: {token: 'must_need', chatid: 'must_need', clientid: 'must_need'},
    imgur: {
        token: 'must_need', albumid: 'get from url, set if u want img into album',
        clientid: 'no need after token get',
        clientsecret: 'no need after token get'
    } //chatid is imgur album name
}

Method2 - Config use .env

.env

line_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

telegram_token= xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
telegram_chatid= 1967680189

discord_token= xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
discord_chatid=1332432695237673052
discord_clientid=1400502410769858632

imgur_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
imgur_albumid=get from url, set if u want img into album
imgur_clientid=no need after token get
imgur_clientsecret=no need after token get

notion_token= ntn_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
notion_chatid=243df44366a8802aaa9bd2ed6ef2f543(notion-page-url-id)

IMs Support

Preparing

  • Line-Notify: ❓[access-token] ~5min
  • ~~Line-Bot-Messaging-API:~~ ❓[API access-token-ID] ❓[cloud-server] ~60min
  • Telegram-bot: ❓[bot-token] ❓[chat-id] ~10min
  • Discord: ❓[User]/❓[Server|Guild]/❓[Message] ID ~15min
  • Notion: ❓[NOTION_TOKEN] ~5min

LINE

  • ⬇️LINE Notify (basic usage, receive from web-ui)
    • You need get Token,
    • then add LINENotify to where u want recive place(can be a group or just u)
      1. https://notify-bot.line.me/
      1. free for 1000 request /per token
      1. ever account can have 100 tokens max
      1. limit info https://notify-bot.line.me/doc/en/
  • LINE bot messaging-api (in advance, u can send message control web-ui)
    • https://developers.line.biz/zh-hant/services/messaging-api/

Telegram

  • Telegram
    • You need get [BotToken] & [ChatId]
      1. https://t.me/botfather
      2. type /newbot
      3. bot name: webuix
      4. bot username("end with _bot"): webuix_bot
      5. okay, u got [BotToken]
      6. add ur new bot as friend: goto https://t.me/webuix_bot
      7. get [ChatID]: https://api.telegram.org/botXXXXXXXXXXXXXXX/getUpdates
      8. find [ChatID] in json file=> ex: 1967680189
  • detail manual: https://core.telegram.org/bots/tutorial#getting-ready
  • get BotToken
    • add botfather inside ur telgram
    • type "/newbot"
    • type "XXXXXXXX_bot"
    • then, u will get botToken
    • then add this bot as ur friend
  • get ChatId
    • replace YOUR_BOT_TOKEN
      • https://api.telegram.org/botYOUR_BOT_TOKEN/getUpdates
  • WhatsApp
    • seems only for business
    • https://business.whatsapp.com/products/business-platform
  • IFTTT (share what's funny how u interactive with web-ui)
    • https://ifttt.com/line
    • https://ifttt.com/explore

Discord

  • [TX & RX] ~~Send Cmd from Discord to sd-web-ui~~ security issue.

  • [TX-only]Send sd-web-ui to Discord. we need

    • [Channel-ID]
    • [Bot-Token]
    • [Invite-Bot-into-Channel]
    [Channel-ID]
    • Create a channel on ur discord
      • In The Discord application go to Settings > Appearance > Check developer mode.
      • Right click channel name and copy the channel ID (Copy ID).
    [Bot-Token]
    • goto Discord Developer Portal. https://discord.com/developers/applications
    • Create App on discord.
    • Add a Bot. Check [Message Content Intent] Save Change.
    • View [Token]. copy it into extension.
    [Invite-Bot-into-Channel]
    • In App page left side menu [OAuth2]->[SCOPES]->checkbox [bot]->permissions [send message] get bot URL.
    • run url. Add bot to channel
      • bot URL ex: https://discord.com/oauth2/authorize?client_id=xxxxxxxxxxxx&permissions=51200&integration_type=0&scope=bot
      • then u should see bot inside channel in user list.(前往「OAuth2」, 在「SCOPES」中點選 bot,下方連接就是機器人邀請連結,就可以將機器人邀請進去你自己的群)

Buy me a Coca cola ☕

https://buymeacoffee.com/xxoooxx

Colophon

Made for fun. I hope if brings you great joy, and perfect hair forever. Contact me with questions and comments, but not threats, please. And feel free to contribute! Pull requests and ideas in Discussions or Issues will be taken quite seriously! --- https://decade.tw

Other Projects Quick Links

  • Auto prompt by LLM and LLM-Vision (Trigger more details out inside model)
    • SD-WEB-UI: https://github.com/xlinx/sd-webui-decadetw-auto-prompt-llm
    • ComfyUI: https://github.com/xlinx/ComfyUI-decadetw-auto-prompt-llm
  • Auto msg to ur mobile (LINE | Telegram | Discord)
    • SD-WEB-UI :https://github.com/xlinx/sd-webui-decadetw-auto-messaging-realtime
    • ComfyUI: https://github.com/xlinx/ComfyUI-decadetw-auto-messaging-realtime
  • I'm SD-VJ. (share SD-generating-process in realtime by gpu)
    • SD-WEB-UI: https://github.com/xlinx/sd-webui-decadetw-spout-syphon-im-vj
    • ComfyUI: https://github.com/xlinx/ComfyUI-decadetw-spout-syphon-im-vj
  • CivitAI Info|discuss:
    • https://civitai.com/articles/6988/extornode-using-llm-trigger-more-detail-that-u-never-thought
    • https://civitai.com/articles/6989/extornode-sd-image-auto-msg-to-u-mobile-realtime
    • https://civitai.com/articles/7090/share-sd-img-to-3rd-software-gpu-share-memory-realtime-spout-or-syphon