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

@siakhooi/box-drawing

v1.5.5

Published

Library to draw boxes

Downloads

29

Readme

ts-box-drawing

npm package to draw box using unicode characters

GitHub Code Style: Google GitHub last commit GitHub tag (latest by date) GitHub issues GitHub closed issues GitHub pull requests GitHub closed pull requests GitHub top language GitHub language count Lines of code GitHub repo size GitHub code size in bytes Workflow workflow workflow Release GitHub release (latest by date) GitHub all releases GitHub Release Date Release npm npm npm type definitions

Quality-npms.io npms.io (final) npms.io (final) npms.io (final) npms.io (final)

Quality-CodeClimate Maintainability Code Climate maintainability Code Climate issues Code Climate technical debt Test Coverage Quality-Sonar Code Smells Duplicated Lines (%) Bugs Vulnerabilities Technical Debt Maintainability Rating Security Rating Reliability Rating Quality Gate Status Lines of Code Coverage Sonar Violations (short format) Sonar Violations (short format) Sonar Violations (short format) Sonar Violations (short format) Sonar Violations (short format) Sonar Violations (short format) Sonar Violations (long format)

Generic badge Generic badge visitors

Locations

Demo

Source Code

Distribution

Code Quality

Reference

Usage

See Demo in Replit: https://replit.com/@siakhooi/siakhooibox-drawing-Demo?v=1

Simple Text

see Demo_HelloWorld

const x = require('@siakhooi/box-drawing');

x.drawBoxThin(text);
x.drawBoxThick(text);
x.drawBoxDouble(text);
x.drawBoxThinCurve(text);
x.drawBoxHorizontalThinVerticalThick(text);
x.drawBoxHorizontalThickVerticalThin(text);
x.drawBoxHorizontalThinVerticalDouble(text);
x.drawBoxHorizontalDoubleVerticalThin(text);
x.drawBoxInnerDoubleOuterThin(text);
x.drawBoxInnerThinOuterDouble(text);
x.drawBoxInnerThinOuterThick(text);
x.drawBoxInnerThickOuterThin(text);
x.drawBoxInnerDoubleOuterThinCurve(text);
x.drawBoxInnerThickOuterThinCurve(text);
x.drawBoxVerticalBarPlusMinus(text);
x.drawBoxVerticalBarPlusMinusSlashes(text);
x.drawBoxVerticalBarPlusEquals(text);
x.drawBoxVerticalBarPlusEqualsSlashes(text);

Array

see Demo_Array

const x = require('@siakhooi/box-drawing');

const textInArray = [
  ['Cell 1-1', 'Cell 2-1'],
  ['Cell 1-2', 'Cell 2-2'],
];

x.drawBoxThin(textInArray);
x.drawBoxThick(textInArray);
x.drawBoxDouble(textInArray);
x.drawBoxThinCurve(textInArray);
x.drawBoxHorizontalThinVerticalThick(textInArray);
x.drawBoxHorizontalThickVerticalThin(textInArray);
x.drawBoxHorizontalThinVerticalDouble(textInArray);
x.drawBoxHorizontalDoubleVerticalThin(textInArray);
x.drawBoxInnerDoubleOuterThin(textInArray);
x.drawBoxInnerThinOuterDouble(textInArray);
x.drawBoxInnerThinOuterThick(textInArray);
x.drawBoxInnerThickOuterThin(textInArray);
x.drawBoxInnerDoubleOuterThinCurve(textInArray);
x.drawBoxInnerThickOuterThinCurve(textInArray);
x.drawBoxVerticalBarPlusMinus(textInArray);
x.drawBoxVerticalBarPlusMinusSlashes(textInArray);
x.drawBoxVerticalBarPlusEquals(textInArray);
x.drawBoxVerticalBarPlusEqualsSlashes(textInArray);

BoxDrawingBuilder

see Demo_Builder

  • Basic
    • setData(data)
    • setStyle(boxStyle)
    • drawBox()
  • Padding
    • padLeft(column, spaces)
    • padRight(column, spaces)
    • padLeftAll(spaces[])
    • padRightAll(spaces[])
    • pad(column, left_spaces, right_spaces)
    • setDefaultPadLeft(spaces)
    • setDefaultPadRight(spaces)
    • setDefaultPad(left_spaces, right_spaces)
  • Horizontal Alignment
    • align(column, horizontalAlignment)
    • alignLeft(columns[])
    • alignRight(columns[])
    • alignCenter(columns[])
    • setDefaultAlignment(horizontalAlignment)

Basic

const {BoxDrawingBuilder, THINCURVE} = require('@siakhooi/box-drawing');

const textInArray = [
  ['Cell 1-1', 'Cell 2-1'],
  ['Cell 1-2', 'Cell 2-2'],
];

new BoxDrawingBuilder().setData(textInArray).setStyle(THINCURVE).drawBox();

Padding

const {BoxDrawingBuilder, THINCURVE} = require('@siakhooi/box-drawing');

const textInArray = [
  ['Cell 1-1', 'Cell 2-1'],
  ['Cell 1-2', 'Cell 2-2'],
];

new BoxDrawingBuilder()
  .setData(textInArray)
  .setStyle(THINCURVE)
  .setDefaultPadLeft(1)
  .setDefaultPadRight(2)
  .padLeft(0, 5)
  .padRight(1, 2)
  .pad(3, 1, 2)
  .padLeftAll([1, 2, 3, 4, 5])
  .padRightAll([5, 4, 3, 2, 1])
  .drawBox();

Horizontal Alignment

const {
  BoxDrawingBuilder,
  THINCURVE,
  HorizontalAlignmentEnum,
} = require('@siakhooi/box-drawing');

const textInArray = [
  ['Cell 1-1', 'Cell 2-1'],
  ['Cell 1-2', 'Cell 2-2'],
];

new BoxDrawingBuilder()
  .setData(textInArray)
  .setStyle(THINCURVE)
  .align(0, HorizontalAlignmentEnum.LEFT)
  .align(1, HorizontalAlignmentEnum.RIGHT)
  .drawBox();

Sudoku Board

const x = require('@siakhooi/box-drawing');

const data = [
  ['1', '2', '3', '4', '5', '6', '7', '8', '9'],
  ['1', '2', '3', '4', '5', '6', '7', '8', '9'],
  ['1', '2', '3', '4', '5', '6', '7', '8', '9'],
  ['1', '2', '3', '4', '5', '6', '7', '8', '9'],
  ['1', '2', '3', '4', '5', '6', '7', '8', '9'],
  ['1', '2', '3', '4', '5', '6', '7', '8', '9'],
  ['1', '2', '3', '4', '5', '6', '7', '8', '9'],
  ['1', '2', '3', '4', '5', '6', '7', '8', '9'],
  ['1', '2', '3', '4', '5', '6', '7', '8', '9'],
];
x.drawSudokuBoardThick(data);
x.drawSudokuBoardDouble(data);