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

@waynechang65/fml-consolelog

v1.1.6

Published

fml-consolelog is a formatted multi-line and ANSI colors supportted text output function module.

Downloads

100

Readme

npm npm Npm package total downloads Build Status GitHub

fml-consolelog

fml-consolelog 是一個支援ANSI顏色及格式化的多行文字輸出函式模組。

fml-consolelog is a formatted multi-line and ANSI colors supportted text output function module.

image

前言(Overview)

在大多數伺服器模式的應用程式下,無論除錯或取得簡單的立即性資訊都會使用Console.log這個函式。
雖然已經有人寫了不少log之類的函式庫,但仍不符合自己使用,於是自己打造一個簡易的多行文字輸出函式。

In most server mode applications, the Console.log function is wildly used regardless of debugging or simple immediate information. Although someone has written a lot of libraries about log functions, they are still not suitable for me, so I just create a simple multi-line text output function module instead.

這模組能做什麼事? (What can it do ?)

  • 支援多種單行或多行的格式化文字輸出 Support single or multiple lines text output
  • 支援ANSI 256色輸出 Support ANSI 256 Colors text output
  • 支援半型與全型字格式化 Support both fullwidth and halfwidth characters

如何在您的專案使用? (How to use it in your project ?)

  • 利用 npm 套件進行下載
    Use npm to install
npm install @waynechang65/fml-consolelog
  • 在您的專案環境中,引用 fml-consolelog模組。
    Include @waynechang65/fml-consolelog package in your project
const fmlog = require('@waynechang65/fml-consolelog').log;
  • 接下來,依照欲使用的函式格式填入適當欄位資料即可。
    Add programs below in your project
fmlog('basic_chat',  
    ['GN:Test Area', '0', 'This is a Test 測試', 'Talking' , 'Wayne Chang', '1234567890']);

如何跑範例程式? (How to run the example ?)

  • 從Github下載fml-consolelog專案程式碼。
    Clone fml-consolelog from GitHub
git clone https://github.com/WayneChang65/fml-consolelog.git
  • 進入fml-consolelog專案目錄
    Get into fml-consolelog directory
cd fml-consolelog
  • 下載跑範例程式所需要的環境組件
    Install dependencies in the cloned fml-consolelog folder
npm install
  • 透過 npm 直接使用以下指令。(實際範例程式在 ./examples/demo.js)
    Run it with npm. (the demo example is in ./examples/demo.js)
npm run start

基本函式 (Base Methods)

  • log(funType, data): 文字輸出函式, Text output function

funType: 函式格式型態, type of function
data: 欲顯示的資料(字串陣列), text output data(String array data type)

貢獻一己之力 (Contribution)

fml-consolelog 雖然是一個小模組,但本人還是希望這個專案能夠持續進步!若有發現臭蟲(bug)或問題,請幫忙在Issue留言告知詳細情形。
歡迎共同開發。歡迎Pull Request,謝謝。:)
★歡迎送PR增加函式輸出格式。

Even though fml-consolelog is a small project, I hope it can be improving. If there is any issue, please comment and welcome to fork and send Pull Request. Thanks. :)
★Welcome to send PR and add text output patterns.