"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/ansistyles/package.json" (11 Apr 2017, 3791 Bytes) of package /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) JSON source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 {
    2   "_from": "ansistyles@>=0.1.3 <0.2.0",
    3   "_id": "ansistyles@0.1.3",
    4   "_location": "/ansistyles",
    5   "_npmUser": {
    6     "name": "thlorenz",
    7     "email": "thlorenz@gmx.de"
    8   },
    9   "_npmVersion": "1.3.11",
   10   "_phantomChildren": {},
   11   "_requiredBy": [
   12     "/npm"
   13   ],
   14   "_resolved": "https://registry.npmjs.org/ansistyles/-/ansistyles-0.1.3.tgz",
   15   "_shasum": "5de60415bda071bb37127854c864f41b23254539",
   16   "_shrinkwrap": null,
   17   "author": {
   18     "name": "Thorsten Lorenz",
   19     "email": "thlorenz@gmx.de",
   20     "url": "thlorenz.com"
   21   },
   22   "bugs": {
   23     "url": "https://github.com/thlorenz/ansistyles/issues"
   24   },
   25   "dependencies": {},
   26   "description": "Functions that surround a string with ansistyle codes so it prints in style.",
   27   "devDependencies": {},
   28   "directories": {},
   29   "dist": {
   30     "shasum": "5de60415bda071bb37127854c864f41b23254539",
   31     "tarball": "http://registry.npmjs.org/ansistyles/-/ansistyles-0.1.3.tgz"
   32   },
   33   "gitHead": "27bf1bc65231bcc7fd109bf13b13601b51f8cd04",
   34   "homepage": "https://github.com/thlorenz/ansistyles#readme",
   35   "keywords": [
   36     "ansi",
   37     "style",
   38     "terminal",
   39     "console"
   40   ],
   41   "license": "MIT",
   42   "main": "ansistyles.js",
   43   "maintainers": [
   44     {
   45       "name": "thlorenz",
   46       "email": "thlorenz@gmx.de"
   47     }
   48   ],
   49   "name": "ansistyles",
   50   "optionalDependencies": {},
   51   "readme": "# ansistyles [![build status](https://secure.travis-ci.org/thlorenz/ansistyles.png)](http://next.travis-ci.org/thlorenz/ansistyles)\n\nFunctions that surround a string with ansistyle codes so it prints in style.\n\nIn case you need colors, like `red`, have a look at [ansicolors](https://github.com/thlorenz/ansicolors).\n\n## Installation\n\n    npm install ansistyles\n\n## Usage\n\n```js\nvar styles = require('ansistyles');\n\nconsole.log(styles.bright('hello world'));    // prints hello world in 'bright' white\nconsole.log(styles.underline('hello world')); // prints hello world underlined\nconsole.log(styles.inverse('hello world'));   // prints hello world black on white\n```\n\n## Combining with ansicolors\n\nGet the ansicolors module:\n\n    npm install ansicolors\n\n```js\nvar styles = require('ansistyles')\n  , colors = require('ansicolors');\n\n  console.log(\n    // prints hello world underlined in blue on a green background\n    colors.bgGreen(colors.blue(styles.underline('hello world'))) \n  );\n```\n\n## Tests\n\nLook at the [tests](https://github.com/thlorenz/ansistyles/blob/master/test/ansistyles.js) to see more examples and/or run them via: \n\n    npm explore ansistyles && npm test\n\n## More Styles\n\nAs you can see from [here](https://github.com/thlorenz/ansistyles/blob/master/ansistyles.js#L4-L15), more styles are available,\nbut didn't have any effect on the terminals that I tested on Mac Lion and Ubuntu Linux.\n\nI included them for completeness, but didn't show them in the examples because they seem to have no effect.\n\n### reset\n\nA style reset function is also included, please note however that this is not nestable.\n\nTherefore the below only underlines `hell` only, but not `world`.\n\n```js\nconsole.log(styles.underline('hell' + styles.reset('o') + ' world'));\n```\n\nIt is essentially the same as:\n\n```js\nconsole.log(styles.underline('hell') + styles.reset('') + 'o world');\n```\n\n\n\n## Alternatives\n\n**ansistyles** tries to meet simple use cases with a very simple API. However, if you need a more powerful ansi formatting tool, \nI'd suggest to look at the [features](https://github.com/TooTallNate/ansi.js#features) of the [ansi module](https://github.com/TooTallNate/ansi.js).\n",
   52   "readmeFilename": "README.md",
   53   "repository": {
   54     "type": "git",
   55     "url": "git://github.com/thlorenz/ansistyles.git"
   56   },
   57   "scripts": {
   58     "test": "node test/ansistyles.js"
   59   },
   60   "version": "0.1.3"
   61 }