UNPKG

pnpm

Version:

Fast, disk space efficient package manager

93 lines (92 loc) 3.48 kB
{ "_args": [ [ { "raw": "ansi-split@^1.0.1", "scope": null, "escapedName": "ansi-split", "name": "ansi-split", "rawSpec": "^1.0.1", "spec": ">=1.0.1 <2.0.0", "type": "range" }, "/home/zoltan/src/pnpm/pnpm/packages/pnpm/node_modules/ansi-diff" ] ], "_from": "ansi-split@>=1.0.1 <2.0.0", "_id": "ansi-split@1.0.1", "_inCache": true, "_location": "/ansi-split", "_nodeVersion": "8.6.0", "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/ansi-split-1.0.1.tgz_1506947338652_0.07209191215224564" }, "_npmUser": { "name": "mafintosh", "email": "mathiasbuus@gmail.com" }, "_npmVersion": "5.3.0", "_phantomChildren": {}, "_requested": { "raw": "ansi-split@^1.0.1", "scope": null, "escapedName": "ansi-split", "name": "ansi-split", "rawSpec": "^1.0.1", "spec": ">=1.0.1 <2.0.0", "type": "range" }, "_requiredBy": [ "/ansi-diff" ], "_resolved": "https://registry.npmjs.org/ansi-split/-/ansi-split-1.0.1.tgz", "_shasum": "3cab03754ab6f1d64d4ad13cd10f22fc36db4a45", "_shrinkwrap": null, "_spec": "ansi-split@^1.0.1", "_where": "/home/zoltan/src/pnpm/pnpm/packages/pnpm/node_modules/ansi-diff", "author": { "name": "Mathias Buus", "url": "@mafintosh" }, "bugs": { "url": "https://github.com/mafintosh/ansi-split/issues" }, "dependencies": { "ansi-regex": "^3.0.0" }, "description": "Split a string into an array based on where an ansi code is present", "devDependencies": { "chalk": "^2.1.0", "standard": "^10.0.3", "tape": "^4.8.0" }, "directories": {}, "dist": { "integrity": "sha512-RRxQym4DFtDNmHIkW6aeFVvrXURb11lGAEPXNiryjCe8bK8RsANjzJ0M2aGOkvBYwP4Bl/xZ8ijtr6D3j1x/eg==", "shasum": "3cab03754ab6f1d64d4ad13cd10f22fc36db4a45", "tarball": "https://registry.npmjs.org/ansi-split/-/ansi-split-1.0.1.tgz" }, "gitHead": "69d1f86416e817326ac3bb6bdee4cc73e133d447", "homepage": "https://github.com/mafintosh/ansi-split", "license": "MIT", "main": "index.js", "maintainers": [ { "name": "mafintosh", "email": "mathiasbuus@gmail.com" } ], "name": "ansi-split", "optionalDependencies": {}, "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", "readmeFilename": "README.md", "repository": { "type": "git", "url": "git+https://github.com/mafintosh/ansi-split.git" }, "scripts": { "test": "standard && tape test.js" }, "version": "1.0.1" }