Coder Social home page Coder Social logo

Comments (11)

zkochan avatar zkochan commented on May 29, 2024 1

wrap-ansi may be used to solve this issue

from table.

gajus avatar gajus commented on May 29, 2024

This feature is controlled using wrapWord configuration, https://github.com/gajus/table#table-usage-text-wrapping.

An example of the resulting output:

╔══════════════════════╗
║ Lorem ipsum dolor    ║
║ sit amet,            ║
║ consectetur          ║
║ adipiscing elit.     ║
║ Phasellus pulvinar   ║
║ nibh sed mauris      ║
║ convallis dapibus.   ║
║ Nunc venenatis       ║
║ tempus nulla sit     ║
║ amet viverra.        ║
╚══════════════════════╝

from table.

msahil-juniper avatar msahil-juniper commented on May 29, 2024

Import command is not working and I also tried require that is also not working
please make it work like require
it says table is not a function

from table.

gajus avatar gajus commented on May 29, 2024

To provide further assistance, provide subject code and the exact error.

On Mar 31, 2016, at 07:49, msahil-juniper [email protected] wrote:

Import command is not working and I also tried require that is also not working
please make it work like require
it says table is not a function


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub

from table.

msahil-juniper avatar msahil-juniper commented on May 29, 2024

error

from table.

msahil-juniper avatar msahil-juniper commented on May 29, 2024
'use strict';

// var table = require('table');

import table from 'table';

let config,
    data,
    output;

data = [
    ['0A', '0B', '0C'],
    ['1A', '1B', '1C'],
    ['2A', '2B', '2C']
];

config = {
    border: {
        topBody: `─`,
        topJoin: `┬`,
        topLeft: `┌`,
        topRight: `┐`,

        bottomBody: `─`,
        bottomJoin: `┴`,
        bottomLeft: `└`,
        bottomRight: `┘`,

        bodyLeft: `│`,
        bodyRight: `│`,
        bodyJoin: `│`,

        joinBody: `─`,
        joinLeft: `├`,
        joinRight: `┤`,
        joinJoin: `┼`
    }
};

output = table(data, config);

console.log(output);

from table.

gajus avatar gajus commented on May 29, 2024

Are you using import or require?

If you are using import, then it should work. If you are using require, then it should be require('table').default.

from table.

msahil-juniper avatar msahil-juniper commented on May 29, 2024

Really Really Thanks..! :)

from table.

msahil-juniper avatar msahil-juniper commented on May 29, 2024

Could you please also tell me where to find the code for "norc" table

from table.

nam-hle avatar nam-hle commented on May 29, 2024

Word wrapping is supported ANSI now #155 😍

from table.

nam-hle avatar nam-hle commented on May 29, 2024

Please help me close this @gajus 😍

from table.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.