{"name":"klor","version":"0.48.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"},"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":{"assert":"^2.0.0","koffee":"^0.56.0","kxk":"^0.304.0","mocha":"^6.1.4","noon":"^2.5.0","onchange":"^6.0.0"},"gitHead":"d0cbb7afce02280740d3e4b2c361a50908f17105","homepage":"https://github.com/monsterkodi/klor#readme","_id":"klor@0.48.0","_nodeVersion":"12.3.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-8ZOpijNqskrflvSD/OSndq8XbPQ8fnwzfTN/AnYfQ4H4HZknCE9QrzwMqv8DNND31XdkcJk85iX4SCSnIKPHuQ==","shasum":"2fc085c8855bd1841f9e884ab98d02d2bd00d3cc","tarball":"http://registry-npm.ywwl.com/klor/download/klor-0.48.0.tgz","fileCount":5,"unpackedSize":238690,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc+Yj5CRA9TVsSAnZWagAAhmcP/2YK/xBUnGmARL0HAT8J\nqwm67ywwYrWaYihZpYYKQadqiB+IyYkrPoGQ27a3uRKo47ZW7y7pxutj4hkP\nTipukl5+yqTlmTLS54Q2slLy6+ZWCAouuJ0hqTy4eHYaI//bio5utw65wSf2\nqpU7vLxvNUvChaHxZO+94N5ddq2FMUBxa29F38SZ3fyVSexklwJOPc5Lfu01\nBRviVGmOhVIzGTAedvrJy1HxkHuNNONgCFVdRIC0XyOA112y7MxpPC6kQ79s\nxla+YiOKOaYCIjI3PNx5ZKHYXitMeh8YHyeVX0f5FMkqjLRNhUS8Axpxnw2V\nWMd53xDiUD6Uam9AsZPDliTgOH1WPeGm6V3EAV/cizx0G1bxZPRIDguCCA6J\nYGriMJrr7eJHkHB/Iu4I7gkn8vxEf5uOkpjnG56pqG5RTj9yhtMgHOXb8bg4\n+1mI7HMgsorqynlQaZvrd9StiF+ScWVGy3pz2UVmQRtcRjpjUUegZkGmU34U\nsbyGWaT71CMJ3oNB+NmSmKdnsR6v2bKOPx8NLoaGW5dQuBj63tPxh4qDjkpO\nLNgebLJq+840YIrAXXIox9ICQTwiKjue7rt15GkFAExDInITxGxyXCKPAcbt\n2w700GsiUC2trWCdw903you5acSm61JrKHuk/3jmZi7078M9ggAiIbFSpLsE\nNt1A\r\n=BOCc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDlowvRZv/o1aoeZFbjlX3NFj3dj+X1IJfUyqqQSfd/kQIhAJZ+EWHCikhus9LSj2hjnZ3huH2uXUD4GugRVmhfEwsd"}],"size":42896,"noattachment":false,"key":"/klor/-/klor-0.48.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_0.48.0_1559857400824_0.23943473535192883"},"_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":1559857400995,"_cnpm_publish_time":1559857400995,"dist-tags":{"latest":"2.17.0"}}