{"name":"klor","version":"1.1.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":{"koffee":"^1.1.0","kxk":"^0.311.0","noon":"^2.13.0","mocha":"^6.1.4","onchange":"^6.0.0"},"gitHead":"967d18fd6feb631e5afdaf4560c0a0d4872c400f","homepage":"https://github.com/monsterkodi/klor#readme","_id":"klor@1.1.0","_nodeVersion":"12.3.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-RgdZKg2TiRi/vVtFgVRs9Uop8/CQE53Wcozu/4oB9fYo8YNojtyZB7tgI/r123kGjYdDbN1hPqkvUGPYZyMNoQ==","shasum":"8cec8f8e53ec7e15a18279dc21673579a3cac4cc","tarball":"http://registry-npm.ywwl.com/klor/download/klor-1.1.0.tgz","fileCount":5,"unpackedSize":230251,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc/r+DCRA9TVsSAnZWagAANasP+QFuRK/fJeG7jUygvJie\nY+PYiuVzP/ZMtmaPjkVmoSRVDMDhI97LOmZ+PIZ/tYPN4MwL90WWgOAIluyW\ncmqilXwJEXkinzcKxqyERHx/ghmd4g5OZxg2vfpoE3QYmw6kue+u4+yMxeIB\nMmHQIRC3j4bBcSmayXn9dX6aAB9B+HQz60A0QHQHnNmnSPVX177rXXQJcxo8\nhw/5Gzvh9JgJO4uYA9cKW2GBriIu9FY5Dd4jIdBMwVn1fSWXigvsjqtBokqw\nkh4u3wqWo7BrO7OGiItX2xmfQPvcciRiEwUxY7Q19yV4FmCKKVf1xZXMtx84\nf68Ymz3LcJ+554DbBeETwNgr6FwyvTBITCrWQZ8IgOT2Vp9yF8Lh2jHeFl/+\nzONGKz/6v+Ow3fTZFzQeZD6Nx6lsmw//g5IRSre5qlEAm3PyZwb5SuR5Hi8W\ndR1LevgxNTJeAIuekFTdGPBQqqSjeILQIvfnGRA40Oio85L7Ax9AmNPCrib+\ntXy9oxoETx+72kVJXo+GMZ8KDqcwskg7Bfcv6p1BwCKMqscoxg4QoUdCrWF/\nxfCOVw+qHyB33zKd3MmGYbfvG7KnoaYLYiRsV2bHvUIwU/Ho1dD2sMHiQoNW\nvC+LHyCQiegOl0zE6j1yJsB6/hQvVFde9V28//lTzasYjDCfR0l6N2GIal1Q\n5ezT\r\n=5oqK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHvUCP0DUd8/u2YlybMVefwEH1vP76a6+sthMdPFHzK8AiAF0zOAbqsour1hlCAyDK7JigfTp3VsjIldXqJOb+R13A=="}],"size":40550,"noattachment":false,"key":"/klor/-/klor-1.1.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.1.0_1560199042969_0.40372497221312376"},"_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":1560199043106,"_cnpm_publish_time":1560199043106,"dist-tags":{"latest":"2.17.0"}}