{"name":"klor","version":"1.2.0","description":"syntax highlighting","keywords":["syntax","highlighting"],"main":"js/klor.js","author":{"name":"monsterkodi"},"license":"Unlicense","repository":{"type":"git","url":"git+https://github.com/monsterkodi/klor.git"},"bugs":{"url":"https://github.com/monsterkodi/klor/issues"},"homepage":"https://www.npmjs.com/package/klor","scripts":{"test":"mocha -c --require koffee/js/register ./coffee/test.coffee","watch":"onchange coffee/test.coffee coffee/klor.coffee -- npm run test","build":"koffee -o js coffee/*.coffee && npm run lang","lang":"koffee --lang coffee/klor.coffee"},"devDependencies":{"koffee":"^1.3.0","kxk":"^0.316.0","noon":"^2.14.1","mocha":"^6.1.4","onchange":"^6.0.0"},"gitHead":"a06908910f5d7664bc4c9f43d28c471b50b1b532","_id":"klor@1.2.0","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-Y10KzEoVZgCXb1Fj5wqFfJ9jclKR7OPtTuRQqkMoNseJ01cBa14avTIsTXpALd6vtYZi3MsrETeDPDtDBEafxw==","shasum":"7607a888fee80e99cd34d79e56376d69caa5f793","tarball":"http://registry-npm.ywwl.com/klor/download/klor-1.2.0.tgz","fileCount":5,"unpackedSize":231551,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdFMWpCRA9TVsSAnZWagAAO90QAIQdd2bWEhaUH2jbSqwu\nIVJCjYRhBd9eo8GOYQM7incslZuMYlnFbrG/xrsl9cV3CmyLHZhCsGOLmJ4h\na+6juvM3zH0ser9O2jQWQZGWU+t0HENVkiugo9hVFldiJeGcwaSD6RkScdqY\n0m9A4XoL5YmVfnYV46lUg0A2f8mlt7xRMvGJR3brvXfjsUp2+Y4NOx/ktjKa\nsyR0U+Co+gMWLUVT0H0ifkyZoL0iGZQ9R0C1OCpE01fZzDP1kpwvDYGlM+1A\neh9LqTCAYb8wHfZtIkWsDLr5+/Q+8BFlx5cqDbElHufShDun8Xo+sqXQa5KR\ntnLD0g8piBuoVAO3BPwDYgSulhXabMuonClPvJ8XCDIV0gtxfO7KqsBz2yWP\nPI08bSA9AU5RHNEV/DfHxhdnKLPYYycvhTjTHeBD3n1/erR7H3qyvnUoHTZ8\nbsCU02iasDRBfIG+Foqhnm89rdP4Weap734IgiuDZgac58TQVL07z0+ndhyU\nrFBSRz19Yl4O1oUTlKVvRO34jUpBkUxdaNnc5/C99FBw7ht33rH8vK8zQbni\nn9CD/1ojxuSKUks23Y9lNXY9HjBwcGdO1KfNnRrQs+KaTCX9AXAm0aOWSO7g\nNh3TXpLSpR/FUj6TTqQLBzlAZ+pZz6CD61YsrJJ0m9hDdCj3kRKdW52YtcDB\nUqFa\r\n=r+9O\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGB15RUKJw8RL6kIDSEaZMfSp8Ed0KjQeprOeWteqZ1JAiEA91KinTa626LuyOZpPFR1uHDiVxv2i/w1XJR+uIB+fTM="}],"size":40708,"noattachment":false,"key":"/klor/-/klor-1.2.0.tgz"},"maintainers":[{"name":"monsterkodi","email":"monsterkodi@gmx.net"}],"_npmUser":{"name":"monsterkodi","email":"monsterkodi@gmx.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/klor_1.2.0_1561642408851_0.2506689033937608"},"_hasShrinkwrap":false,"readme":"\n![klor](test/sample.png)\n\n**klor** is a simple syntax highlighting tool.\nIt exports the following function:\n\n### **parse** *lines*, *ext*\n\n- *lines*: array of strings\n- *ext*: file type\n    - coffee js ts \n    - styl css sass\n    - pug html svg \n    - bash fish sh \n    - cpp hpp c h \n    - noon json\n    - md plist \n    \n**returns** an array of objects:\n\n```coffeescript\n[\n    ext:    string              \n    chars:  number              \n    index:  number              \n    number: index+1 \n    chunks: [\n                match:  string  # without whitespace characters\n                clss:   string  # value of match\n                turd:   string  # following punctuation characters\n                start:  number  # character index of match in line\n                length: number  # length of match\n            ]\n...\n]\n```\n\nSee [kolor.map](https://github.com/monsterkodi/klor/blob/master/coffee/kolor.coffee) for a list of recognized chunk values.\n\n## 🌈 kolor\n\n**kolor** is a submodule which exports a bunch of functions for wrapping strings in 256 color ansi codes.\n\nIt's a merge of [colorette](https://github.com/jorgebucaran/colorette) and [ansi-256-colors](https://github.com/jbnicolai/ansi-256-colors)\n\n- [r g b c m y w][1..8] foreground colors \n- [R G B C M Y W][1..8] background colors\n    \n```coffeescript\nklor = require 'klor'\nklor.kolor.globalize() # hoist color functions into the global scope\nlog y8 'bright yellow' + R1 'on dark red'\n```\n\n[![npm package][npm-image]][npm-url] \n[![Build Status][travis-image]][travis-url] \n[![downloads][downloads-image]][downloads-url] \n\n[npm-image]:https://img.shields.io/npm/v/klor.svg\n[npm-url]:http://npmjs.org/package/klor\n[travis-image]:https://travis-ci.org/monsterkodi/klor.svg?branch=master\n[travis-url]:https://travis-ci.org/monsterkodi/klor\n[downloads-image]:https://img.shields.io/npm/dm/klor.svg\n[downloads-url]:https://www.npmtrends.com/klor\n","publish_time":1561642409101,"_cnpm_publish_time":1561642409101,"dist-tags":{"latest":"2.17.0"}}