{"name":"klor","version":"2.3.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.4.0","kxk":"^0.356.0","noon":"^3.0.0","mocha":"^6.2.2","onchange":"^6.1.0"},"gitHead":"634d9c29e0653072a317071cd3c501f81901f5c3","_id":"klor@2.3.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-ICpGuxWTnU2PAnW+jLWq/uDx7AyM7IKBi4QTwaDLRgTKCbDhmr6re7JK+2wgoGP+QCij1m8FT43WvMkCtRP1qQ==","shasum":"b152eed5e47d33d29cc2d7348d05dbf0b65ac306","tarball":"http://registry-npm.ywwl.com/klor/download/klor-2.3.0.tgz","fileCount":5,"unpackedSize":244873,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeF7GLCRA9TVsSAnZWagAAo1wP/RlalQXhuGV73hRE1oUZ\nUsjJSGP/8EWZ418hD8L6SHlb6nmyEoexQiKtYdppuIFTQ4pSmbGyhCNEjZOe\nBcD+D21VfN34xUpfVGjkkc/Nqu71zTQAEWu7D83+qTEUhci8kPOhxlPOJWcF\nWNeNj1EmAMQGTHmiHN1G5EsuYKACptPnsMe2vaaWEXf1qJ2t2RmXb6417Ac6\na6UaRjG+LL6naln31iu4SmZJANhm7mjInoFVFn7cQKjpDNqgG7w8QdSz3/0W\nFH9TqQa3lq0553NPZ0UOTHd/lARpIrLA0pBF5FJztiG1gvMbQO9p4eqAMYFD\nQxYXIQR+coznXwls2Vj0ExtbxDtcaTGd+/fclI48U6Lmyf3zOwP/HUlwbdnO\n0T9mllqu4QhZSBQJVIkGLsDkm3h0hfZaCzl/wTwQg4lp1mMEUDgRiFVqdV3w\n4pwOc1dhExIV7qEjj3LRrk4MLw7r3q0P8Kcd2vGa0eaLNGb7QD0rL3JlndGV\njqHa13BrqS3A/uVt+3V3SDRrHtWAUF7NoeDWDl1aTADmM7caVWf4DmqZ5zue\npg32uc1253qyOp7WK2LvBk0TuPln8fC+1QgZGMQmqmJpD31g7kHfe4OXRUCB\nDSJ4/qiuWJIHc1ktVEkzw8DyfArXMLii05ds4dvCyoAhYTY0kZGAIhsOhjwr\nBM4C\r\n=1KLL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDwQzMiWPVE1zzdkIF0sXnJjJSIREygeIN5dw+wLKCEbAiATK1r5F33+H5QZ9J093vhIdxP+OHeWaKJwYhtEvA6YFA=="}],"size":41301,"noattachment":false,"key":"/klor/-/klor-2.3.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_2.3.0_1578611082622_0.7639011206406363"},"_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":1578611082786,"_cnpm_publish_time":1578611082786,"dist-tags":{"latest":"2.17.0"}}