{"_id":"ansi-split","_rev":"2-cea839bb7513b102b52d76abe290c83b","name":"ansi-split","description":"Split a string into an array based on where an ansi code is present","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"ansi-split","version":"1.0.0","description":"Split a string into an array based on where an ansi code is present","main":"index.js","dependencies":{"ansi-regex":"^3.0.0"},"devDependencies":{"chalk":"^2.1.0","standard":"^10.0.3","tape":"^4.8.0"},"scripts":{"test":"standard && tape test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/ansi-split.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/ansi-split/issues"},"homepage":"https://github.com/mafintosh/ansi-split","gitHead":"8b9a94cbcdbd735eaa8d20c3cb27b413be358a05","_id":"ansi-split@1.0.0","_npmVersion":"5.3.0","_nodeVersion":"8.6.0","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"integrity":"sha512-sIU9yuMHuA8P1EP4pOAMeqk3lqdi6faxFwVffiJnwHGlErK3X3TAwYeHpOmiWPHDloGpRg/Ax+sSWzY0DKeG5Q==","shasum":"b91fe9a611ca8e7aa7fa7fe584edad74e3bd7664","tarball":"https://registry.npmjs.org/ansi-split/-/ansi-split-1.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD9Q5niEtKjDBGcIm07t1UYB7qxrAcfJDnZ6ACr27jQxgIhAPExk2qB3ysF519Y88CEKvxSxnFyqJnNDDn2t5UtQP8i"}]},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ansi-split-1.0.0.tgz_1506940844661_0.08828288549557328"}},"1.0.1":{"name":"ansi-split","version":"1.0.1","description":"Split a string into an array based on where an ansi code is present","main":"index.js","dependencies":{"ansi-regex":"^3.0.0"},"devDependencies":{"chalk":"^2.1.0","standard":"^10.0.3","tape":"^4.8.0"},"scripts":{"test":"standard && tape test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/ansi-split.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/ansi-split/issues"},"homepage":"https://github.com/mafintosh/ansi-split","gitHead":"69d1f86416e817326ac3bb6bdee4cc73e133d447","_id":"ansi-split@1.0.1","_npmVersion":"5.3.0","_nodeVersion":"8.6.0","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"integrity":"sha512-RRxQym4DFtDNmHIkW6aeFVvrXURb11lGAEPXNiryjCe8bK8RsANjzJ0M2aGOkvBYwP4Bl/xZ8ijtr6D3j1x/eg==","shasum":"3cab03754ab6f1d64d4ad13cd10f22fc36db4a45","tarball":"https://registry.npmjs.org/ansi-split/-/ansi-split-1.0.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG4673+nd3+qT9mru/vhFwsxUnD2PbSc3IxfB1hJYc7bAiEA7lgjywOiPKoBIG92QlELKQZ9foQG1LE8uL2Eoei5MNY="}]},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ansi-split-1.0.1.tgz_1506947338652_0.07209191215224564"}}},"readme":"# ansi-split\n\nSplit a string into an array based on where an ansi code is present\n\n```\nnpm install ansi-split\n```\n\n[![Build Status](https://travis-ci.org/mafintosh/ansi-split.svg?branch=master)](https://travis-ci.org/mafintosh/ansi-split)\n\n## Usage\n\n``` js\nvar ansiSplit = require('ansi-split')\nvar chalk = require('chalk')\n\n// prints ['hello world']\nconsole.log(ansiSplit('hello world'))\n\n// prints ['', '\\u001b[31m', 'hello', '\\u001b[39m', ' world']\nconsole.log(ansiSplit(chalk.red('hello') + ' world'))\n\n// prints ['', '\\u001b[31m\\u001b[1m', 'hello', '\\u001b[22m\\u001b[39m', ' ', '\\u001b[32m', 'world', '\\u001b[39m', '']\nconsole.log(ansiSplit(chalk.red.bold('hello') + ' ' + chalk.green('world')))\n```\n\n## API\n\n#### `var array = ansiSplit(str)`\n\nSplits a string everytime there is an ansi code present.\nThe result is an array where every even index is a non-ansi string and every odd index if an ansi string\n\n## License\n\nMIT\n","maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"time":{"modified":"2022-04-11T14:18:46.851Z","created":"2017-10-02T10:40:45.591Z","1.0.0":"2017-10-02T10:40:45.591Z","1.0.1":"2017-10-02T12:28:59.535Z"},"homepage":"https://github.com/mafintosh/ansi-split","repository":{"type":"git","url":"git+https://github.com/mafintosh/ansi-split.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"bugs":{"url":"https://github.com/mafintosh/ansi-split/issues"},"license":"MIT","readmeFilename":"README.md"}