verttext

1.0.73 • Public • Published

verttext

verttext is a node module which converts horizontally-aligned text to a vertical one. This module may be useful for East-Asia languages like Chinese and Japanese.

#Usage verttext(string: text, integer: number of characters per line, string: separator, integer: number of separator)

#Example In index.js

var vt = require("verttext");

vt.verttext("根據羅馬神話,羅馬的建城日是公元前753年4月21日[5],距今已有2700多年的歷史,是由一對被母狼餵哺養大的雙胞胎羅穆盧斯和瑞摩斯建立的[6],最初建在景色秀麗的七座山丘之上,因此稱為「七丘之城」。", 30, " ", 1);

The function returns a piece of vertically aligned text. Each line has 30 characters and is separated by one " " (space) from other lines.

Source of the piece of text above: Wikipedia

Package Sidebar

Install

npm i verttext

Weekly Downloads

0

Version

1.0.73

License

MIT

Last publish

Collaborators

  • micbrown