{"_id":"path-array","_rev":"79150","name":"path-array","description":"Treat your $PATH like a JavaScript Array","dist-tags":{"latest":"1.0.1"},"maintainers":[{"name":"tootallnate","email":"nathan@tootallnate.net"}],"time":{"modified":"2021-06-03T10:25:21.000Z","created":"2013-12-21T23:24:25.118Z","1.0.1":"2016-01-15T00:02:28.977Z","1.0.0":"2014-11-11T22:39:50.703Z","0.0.2":"2013-12-22T20:18:55.604Z","0.0.1":"2013-12-21T23:24:25.118Z"},"users":{},"author":{"name":"Nathan Rajlich","email":"nathan@tootallnate.net","url":"http://n8.io/"},"repository":{"type":"git","url":"git://github.com/TooTallNate/node-path-array.git"},"versions":{"1.0.1":{"name":"path-array","version":"1.0.1","description":"Treat your $PATH like a JavaScript Array","main":"index.js","scripts":{"test":"mocha --reporter spec"},"repository":{"type":"git","url":"git://github.com/TooTallNate/node-path-array.git"},"keywords":["PATH","env","array"],"author":{"name":"Nathan Rajlich","email":"nathan@tootallnate.net","url":"http://n8.io/"},"license":"MIT","bugs":{"url":"https://github.com/TooTallNate/node-path-array/issues"},"homepage":"https://github.com/TooTallNate/node-path-array","dependencies":{"array-index":"^1.0.0"},"devDependencies":{"mocha":"~1.16.1"},"gitHead":"d249bd897661ca60720218edabbfeaa73c67778a","_id":"path-array@1.0.1","_shasum":"7e2f0f35f07a2015122b868b7eac0eb2c4fec271","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.3.0","_npmUser":{"name":"tootallnate","email":"nathan@tootallnate.net"},"maintainers":[{"name":"tootallnate","email":"nathan@tootallnate.net"}],"dist":{"shasum":"7e2f0f35f07a2015122b868b7eac0eb2c4fec271","size":3995,"noattachment":false,"key":"/path-array/-/path-array-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/path-array/download/path-array-1.0.1.tgz"},"directories":{},"publish_time":1452816148977,"_cnpm_publish_time":1452816148977,"_hasShrinkwrap":false},"1.0.0":{"name":"path-array","version":"1.0.0","description":"Treat your $PATH like a JavaScript Array","main":"index.js","scripts":{"test":"mocha --reporter spec"},"repository":{"type":"git","url":"git://github.com/TooTallNate/node-path-array.git"},"keywords":["PATH","env","array"],"author":{"name":"Nathan Rajlich","email":"nathan@tootallnate.net","url":"http://n8.io/"},"license":"MIT","bugs":{"url":"https://github.com/TooTallNate/node-path-array/issues"},"homepage":"https://github.com/TooTallNate/node-path-array","dependencies":{"array-index":"~0.1.0"},"devDependencies":{"mocha":"~1.16.1"},"gitHead":"5d1fedd54e4413459f67e4a4babb024144cd00d0","_id":"path-array@1.0.0","_shasum":"6c14130c33084f0150553c657b38397ab67aaa4e","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"tootallnate","email":"nathan@tootallnate.net"},"maintainers":[{"name":"tootallnate","email":"nathan@tootallnate.net"}],"dist":{"shasum":"6c14130c33084f0150553c657b38397ab67aaa4e","size":3559,"noattachment":false,"key":"/path-array/-/path-array-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/path-array/download/path-array-1.0.0.tgz"},"directories":{},"publish_time":1415745590703,"_cnpm_publish_time":1415745590703,"_hasShrinkwrap":false},"0.0.2":{"name":"path-array","version":"0.0.2","description":"Treat your $PATH like a JavaScript Array","main":"index.js","scripts":{"test":"mocha --reporter spec"},"repository":{"type":"git","url":"git://github.com/TooTallNate/node-path-array.git"},"keywords":["PATH","env","array"],"author":{"name":"Nathan Rajlich","email":"nathan@tootallnate.net","url":"http://n8.io/"},"license":"MIT","bugs":{"url":"https://github.com/TooTallNate/node-path-array/issues"},"homepage":"https://github.com/TooTallNate/node-path-array","dependencies":{"array-index":"~0.1.0"},"devDependencies":{"mocha":"~1.16.1"},"readmeFilename":"README.md","_id":"path-array@0.0.2","dist":{"shasum":"465b93b2321774cd8d96c680f57a1b3999932cbe","size":3423,"noattachment":false,"key":"/path-array/-/path-array-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/path-array/download/path-array-0.0.2.tgz"},"_from":".","_npmVersion":"1.3.17","_npmUser":{"name":"tootallnate","email":"nathan@tootallnate.net"},"maintainers":[{"name":"tootallnate","email":"nathan@tootallnate.net"}],"directories":{},"publish_time":1387743535604,"_cnpm_publish_time":1387743535604,"_hasShrinkwrap":false},"0.0.1":{"name":"path-array","version":"0.0.1","description":"Treat your $PATH like a JavaScript Array","main":"index.js","scripts":{"test":"mocha --reporter spec"},"repository":{"type":"git","url":"git://github.com/TooTallNate/node-path-array.git"},"keywords":["PATH","env","array"],"author":{"name":"Nathan Rajlich","email":"nathan@tootallnate.net","url":"http://n8.io/"},"license":"MIT","bugs":{"url":"https://github.com/TooTallNate/node-path-array/issues"},"homepage":"https://github.com/TooTallNate/node-path-array","dependencies":{"array-index":"~0.1.0"},"readmeFilename":"README.md","_id":"path-array@0.0.1","dist":{"shasum":"9a7e8b4865a11f0a196418b778e519fa52d1dd3c","size":2472,"noattachment":false,"key":"/path-array/-/path-array-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/path-array/download/path-array-0.0.1.tgz"},"_from":".","_npmVersion":"1.3.17","_npmUser":{"name":"tootallnate","email":"nathan@tootallnate.net"},"maintainers":[{"name":"tootallnate","email":"nathan@tootallnate.net"}],"directories":{},"publish_time":1387668265118,"_cnpm_publish_time":1387668265118,"_hasShrinkwrap":false}},"readme":"path-array\n==========\n### Treat your `$PATH` like a JavaScript Array\n[![Build Status](https://travis-ci.org/TooTallNate/path-array.svg?branch=master)](https://travis-ci.org/TooTallNate/path-array)\n\nThis module provides a JavaScript `Array` implementation that is backed by your\n`$PATH` env variable. That is, you can use regular Array functions like `shift()`,\n`pop()`, `push()`, `unshift()`, etc. to mutate your `$PATH`.\n\nAlso works for preparing an `env` object for passing to\n[`child_process.spawn()`][cp.spawn].\n\n\nInstallation\n------------\n\nInstall with `npm`:\n\n``` bash\n$ npm install path-array\n```\n\n\nExample\n-------\n\nInteracting with your own `$PATH` env variable:\n\n``` js\nvar PathArray = require('path-array');\n\n// no args uses `process.env` by default\nvar p = new PathArray();\n\nconsole.log(p);\n// [ './node_modules/.bin',\n//   '/opt/local/bin',\n//   '/opt/local/sbin',\n//   '/usr/local/bin',\n//   '/usr/local/sbin',\n//   '/usr/bin',\n//   '/bin',\n//   '/usr/sbin',\n//   '/sbin',\n//   '/usr/local/bin',\n//   '/opt/X11/bin' ]\n\n// push another path entry. this function mutates the `process.env.PATH`\np.unshift('/foo');\n\nconsole.log(process.env.PATH);\n// '/foo:./node_modules/.bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin'\n```\n\n\nAPI\n---\n\n### new PathArray([env]) → PathArray\n\nCreates and returns a new `PathArray` instance with the given `env` object. If no\n`env` is specified, then [`process.env`][process.env] is used by default.\n\n\nLicense\n-------\n\n(The MIT License)\n\nCopyright (c) 2013 Nathan Rajlich &lt;nathan@tootallnate.net&gt;\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n[process.env]: http://nodejs.org/docs/latest/api/process.html#process_process_env\n[cp.spawn]: http://nodejs.org/docs/latest/api/child_process.html#child_process_child_process_spawn_command_args_options\n","_attachments":{},"homepage":"https://github.com/TooTallNate/node-path-array","bugs":{"url":"https://github.com/TooTallNate/node-path-array/issues"},"license":"MIT"}