UNPKG

@zkochan/pnpm

Version:

Fast, disk space efficient package manager

112 lines (111 loc) 7.1 kB
{ "_args": [ [ { "raw": "cli-box@5.0.0", "scope": null, "escapedName": "cli-box", "name": "cli-box", "rawSpec": "5.0.0", "spec": "5.0.0", "type": "version" }, "/home/zkochan/src/pnpm/packages/pnpm/node_modules/le-table" ] ], "_from": "cli-box@5.0.0", "_id": "cli-box@5.0.0", "_inCache": true, "_location": "/cli-box", "_nodeVersion": "0.12.1", "_npmUser": { "name": "ionicabizau", "email": "bizauionica@gmail.com" }, "_npmVersion": "2.7.6", "_phantomChildren": {}, "_requested": { "raw": "cli-box@5.0.0", "scope": null, "escapedName": "cli-box", "name": "cli-box", "rawSpec": "5.0.0", "spec": "5.0.0", "type": "version" }, "_requiredBy": [ "/le-table", "/overlap" ], "_resolved": "https://registry.npmjs.org/cli-box/-/cli-box-5.0.0.tgz", "_shasum": "870ea8aa77e7c25179416ceccfe5ed0690804602", "_shrinkwrap": null, "_spec": "cli-box@5.0.0", "_where": "/home/zkochan/src/pnpm/packages/pnpm/node_modules/le-table", "author": { "name": "Ionică Bizău", "email": "bizauionica@gmail.com" }, "blah": { "h_img": "http://i.imgur.com/6bOa5iy.png", "ex_img": "http://i.imgur.com/425gC67.png" }, "bugs": { "url": "https://github.com/IonicaBizau/node-cli-box/issues" }, "contributors": [ { "name": "Ionică Bizău", "email": "bizauionica@gmail.com" }, { "name": "Adam Paszke", "email": "adam.paszke@gmail.com" }, { "name": "ComFreek", "email": "comfreek@outlook.com" } ], "dependencies": { "ansi-parser": "3.0.0", "ul": "5.0.0" }, "description": "A library to generate ASCII boxes via NodeJS", "devDependencies": {}, "directories": { "example": "example" }, "dist": { "shasum": "870ea8aa77e7c25179416ceccfe5ed0690804602", "tarball": "https://registry.npmjs.org/cli-box/-/cli-box-5.0.0.tgz" }, "gitHead": "6222dccb840d8d67634e59c5bb23d99d3039ad6a", "homepage": "https://github.com/IonicaBizau/node-cli-box", "keywords": [ "cli", "box", "ascii", "node" ], "license": "KINDLY", "main": "lib/index.js", "maintainers": [ { "name": "ionicabizau", "email": "bizauionica@yahoo.com" } ], "name": "cli-box", "optionalDependencies": {}, "readme": "<!---------------------------------------------------------------------------->\n<!-- STOP, LOOK & LISTEN! -->\n<!-- ==================== -->\n<!-- Do NOT edit this file directly since it's generated from a template -->\n<!-- file, using https://github.com/IonicaBizau/node-blah -->\n<!-- -->\n<!-- If you found a typo in documentation, fix it in the source files -->\n<!-- (`lib/*.js`) and make a pull request. -->\n<!-- -->\n<!-- If you have any other ideas, open an issue. -->\n<!-- -->\n<!-- Please consider reading the contribution steps (CONTRIBUTING.md). -->\n<!-- * * * Thanks! * * * -->\n<!---------------------------------------------------------------------------->\n\n![cli-box](http://i.imgur.com/6bOa5iy.png)\n\n# cli-box [![Donate now][donate-now]][paypal-donations]\n\nA library to generate ASCII boxes via NodeJS\n\n![cli-box](http://i.imgur.com/425gC67.png)\n\n## Installation\n\n```sh\n$ npm i cli-box\n```\n\n## Example\n\n```js\n// Dependencies\nvar Box = require(\"cli-box\");\n\n// Create a simple box\nvar b1 = Box(\"20x10\");\nconsole.log(b1.toString());\n\n// Set custom marks\nvar b2 = new Box({\n w: 10\n , h: 10\n , stringify: false\n , marks: {\n nw: \"\"\n , n: \"══\"\n , ne: \"\"\n , e: \"\"\n , se: \"\"\n , s: \"══\"\n , sw: \"\"\n , w: \"\"\n , b: \"░░\"\n }\n});\nconsole.log(b2.stringify());\n\n// Box with text and use the stringify\nvar b3 = Box(\"20x10\", \"I will be \\u001b[31mdis\\u001b[0mplayed inside! \\n A\\u001b[34mnd I'm in a\\u001b[0m new line!\");\nconsole.log(b3);\n\n// Box with aligned text to top-right\nvar b4 = Box(\"30x20\", {\n text: \"Box content\"\n , stretch: true\n , autoEOL: true\n , vAlign: \"top\"\n , hAlign: \"right\"\n});\nconsole.log(b4);\n\n// Full screen box\nvar b5 = Box({fullscreen: true, marks: {}}, \"Hello World!\");\nconsole.log(b5.toString());\n\n```\n\n## Documentation\n\n### `CliBox(options, text)`\nCreates a new ASCII box.\n\n#### Params\n- **Object|String** `options`: A string representing the size: `WIDTHxHEIGHT` (e.g. `10x20`) or an object:\n\n - `width` or `w` (Number): The box width.\n - `height` or `h` (Number): The box height.\n - `fullscreen` (Boolean): If `true`, the box will have full size\n (default: `false`).\n - `stringify` (Boolean): If `false` the box will not be stringified (the\n `CliBox` object will be returned instead).\n - `marks` (Object): An object containing mark characters. Default:\n - `nw`: `\"+\"`\n - `n`: `\"-\"`\n - `ne`: `\"+\"`\n - `e`: `\"|\"`\n - `se`: `\"+\"`\n - `s`: `\"-\"`\n - `sw`: `\"+\"`\n - `w`: `\"|\"`\n - `b`: `\" \"`\n- **Object|String** `text`: A string to be displayed or an object:\n - `text` (String): The text to be displayed.\n - `stretch` (Boolean): Stretch box to fix text (default: `false`).\n - `autoEOL` (Boolean): Break lines automatically (default: `false`).\n - `hAlign` (String): Horizontal alignement (default: `\"middle\"`). It can\n take one of the values: `\"left\"`, `\"middle\"`, `\"right\"`.\n - `vAlign` (String): Vertical alignement (default: `\"center\"`). It can take\n one of the values: `\"top\"`, `\"center\"`, `\"bottom\"`.\n\n#### Return\n- **Object|Stringify** The `CliBox` object (if `options.stringify` is `false`) or the stringified box.\n\n### `stringify()`\nReturns the stringified box.\n\n#### Return\n- **String** Stringified box string.\n\n## How to contribute\nHave an idea? Found a bug? See [how to contribute][contributing].\n\n## License\n[KINDLY][license] © [Ionică Bizău][website]–The [LICENSE](/LICENSE) file contains\na copy of the license.\n\n[license]: http://ionicabizau.github.io/kindly-license/?author=Ionic%C4%83%20Biz%C4%83u%20%3Cbizauionica@gmail.com%3E&year=2015\n[contributing]: /CONTRIBUTING.md\n[website]: http://ionicabizau.net\n[docs]: /DOCUMENTATION.md\n[paypal-donations]: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=MG98D7NPFZ3MG\n[donate-now]: http://i.imgur.com/jioicaN.png", "readmeFilename": "README.md", "repository": { "type": "git", "url": "git+ssh://git@github.com/IonicaBizau/node-cli-box.git" }, "scripts": { "test": "node example/index" }, "version": "5.0.0" }