{"_id":"xpipe","_rev":"260971","name":"xpipe","description":"Use cross-platform IPC paths in node.","dist-tags":{"latest":"1.0.5"},"maintainers":[{"name":"nodexo","email":"dev@nodexo.net"}],"time":{"modified":"2021-06-03T16:45:13.000Z","created":"2016-09-03T07:10:21.012Z","1.0.5":"2016-09-05T18:11:55.730Z","1.0.4":"2016-09-03T19:18:59.371Z","1.0.3":"2016-09-03T10:11:14.699Z","1.0.2":"2016-09-03T09:22:23.046Z","1.0.1":"2016-09-03T08:05:22.340Z","1.0.0":"2016-09-03T07:10:21.012Z"},"users":{},"author":{"name":"Michael Kortstiege"},"repository":{"type":"git","url":"git+https://github.com/nodexo/xpipe.git"},"versions":{"1.0.5":{"name":"xpipe","version":"1.0.5","description":"Use cross-platform IPC paths in node.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/nodexo/xpipe.git"},"keywords":["ipc","path","cross platform","unix","sockets","windows","named pipes"],"author":{"name":"Michael Kortstiege"},"license":"MIT","bugs":{"url":"https://github.com/nodexo/xpipe/issues"},"homepage":"https://github.com/nodexo/xpipe#readme","gitHead":"8cc87189946b94cacb057f33a55c50eeb4906289","_id":"xpipe@1.0.5","_shasum":"8dd8bf45fc3f7f55f0e054b878f43a62614dafdf","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"nodexo","email":"mk@nodexo.de"},"dist":{"shasum":"8dd8bf45fc3f7f55f0e054b878f43a62614dafdf","size":2593,"noattachment":false,"key":"/xpipe/-/xpipe-1.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/xpipe/download/xpipe-1.0.5.tgz"},"maintainers":[{"name":"nodexo","email":"dev@nodexo.net"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/xpipe-1.0.5.tgz_1473099113821_0.5368920692708343"},"directories":{},"publish_time":1473099115730,"_cnpm_publish_time":1473099115730,"_hasShrinkwrap":false},"1.0.4":{"name":"xpipe","version":"1.0.4","description":"Use cross-platform IPC paths in node.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/nodexo/xpipe.git"},"keywords":["ipc","path","cross platform","unix","sockets","windows","named pipes"],"author":{"name":"Michael Kortstiege"},"license":"MIT","bugs":{"url":"https://github.com/nodexo/xpipe/issues"},"homepage":"https://github.com/nodexo/xpipe#readme","gitHead":"072d2b1fef52f566cb88589bc22a6166734ab7f3","_id":"xpipe@1.0.4","_shasum":"67fd3fdeaf4af896d95f5e050d1ab433a5907125","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"nodexo","email":"mk@nodexo.de"},"dist":{"shasum":"67fd3fdeaf4af896d95f5e050d1ab433a5907125","size":2605,"noattachment":false,"key":"/xpipe/-/xpipe-1.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/xpipe/download/xpipe-1.0.4.tgz"},"maintainers":[{"name":"nodexo","email":"dev@nodexo.net"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/xpipe-1.0.4.tgz_1472930337700_0.932426966028288"},"directories":{},"publish_time":1472930339371,"_cnpm_publish_time":1472930339371,"_hasShrinkwrap":false},"1.0.3":{"name":"xpipe","version":"1.0.3","description":"Use cross-platform IPC paths in node.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/nodexo/xpipe.git"},"keywords":["ipc","path","cross platform","unix","sockets","windows","named pipes"],"author":{"name":"Michael Kortstiege"},"license":"MIT","bugs":{"url":"https://github.com/nodexo/xpipe/issues"},"homepage":"https://github.com/nodexo/xpipe#readme","gitHead":"cd2ea6d66b24f293def7723db905c47e93ae6576","_id":"xpipe@1.0.3","_shasum":"b7a09589b0f61ceb91bfe3ad02e1a2c5930acd82","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"nodexo","email":"mk@nodexo.de"},"dist":{"shasum":"b7a09589b0f61ceb91bfe3ad02e1a2c5930acd82","size":2596,"noattachment":false,"key":"/xpipe/-/xpipe-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/xpipe/download/xpipe-1.0.3.tgz"},"maintainers":[{"name":"nodexo","email":"dev@nodexo.net"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/xpipe-1.0.3.tgz_1472897472825_0.13025472895242274"},"directories":{},"publish_time":1472897474699,"_cnpm_publish_time":1472897474699,"_hasShrinkwrap":false},"1.0.2":{"name":"xpipe","version":"1.0.2","description":"Use cross-platform IPC paths in node.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/nodexo/xpipe.git"},"keywords":["ipc","path","cross platform","unix","sockets","windows","named pipes"],"author":{"name":"Michael Kortstiege"},"license":"MIT","bugs":{"url":"https://github.com/nodexo/xpipe/issues"},"homepage":"https://github.com/nodexo/xpipe#readme","gitHead":"34f937aab06cbbeaf205505494738f57b827fddb","_id":"xpipe@1.0.2","_shasum":"b984258955b2c71bf3eb2f10d7048e3b5f53b829","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"nodexo","email":"mk@nodexo.de"},"dist":{"shasum":"b984258955b2c71bf3eb2f10d7048e3b5f53b829","size":2604,"noattachment":false,"key":"/xpipe/-/xpipe-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/xpipe/download/xpipe-1.0.2.tgz"},"maintainers":[{"name":"nodexo","email":"dev@nodexo.net"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/xpipe-1.0.2.tgz_1472894540704_0.1690601904410869"},"directories":{},"publish_time":1472894543046,"_cnpm_publish_time":1472894543046,"_hasShrinkwrap":false},"1.0.1":{"name":"xpipe","version":"1.0.1","description":"Use cross-platform IPC paths in node.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/nodexo/xpipe.git"},"keywords":["ipc","path","cross platform","unix","sockets","windows","named pipes"],"author":{"name":"Michael Kortstiege"},"license":"MIT","bugs":{"url":"https://github.com/nodexo/xpipe/issues"},"homepage":"https://github.com/nodexo/xpipe#readme","gitHead":"e874789248d3767c9d4d77aba81c906e4cf0ea3e","_id":"xpipe@1.0.1","_shasum":"02b46ecd77690933f6c706fa7f3be909a38fc246","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"nodexo","email":"mk@nodexo.de"},"dist":{"shasum":"02b46ecd77690933f6c706fa7f3be909a38fc246","size":2581,"noattachment":false,"key":"/xpipe/-/xpipe-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/xpipe/download/xpipe-1.0.1.tgz"},"maintainers":[{"name":"nodexo","email":"dev@nodexo.net"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/xpipe-1.0.1.tgz_1472889920253_0.7879397107753903"},"directories":{},"publish_time":1472889922340,"_cnpm_publish_time":1472889922340,"_hasShrinkwrap":false},"1.0.0":{"name":"xpipe","version":"1.0.0","description":"Use cross-platform IPC paths in node.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/nodexo/xpipe.git"},"keywords":["ipc","path","cross platform","unix","sockets","windows","named pipes"],"author":{"name":"Michael Kortstiege"},"license":"MIT","bugs":{"url":"https://github.com/nodexo/xpipe/issues"},"homepage":"https://github.com/nodexo/xpipe#readme","gitHead":"c6350ffd0979524227a1f8721b20d5b015821cde","_id":"xpipe@1.0.0","_shasum":"d0324266b905bab3146e5fefc9539427ac62aa3d","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"nodexo","email":"mk@nodexo.de"},"dist":{"shasum":"d0324266b905bab3146e5fefc9539427ac62aa3d","size":2115,"noattachment":false,"key":"/xpipe/-/xpipe-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/xpipe/download/xpipe-1.0.0.tgz"},"maintainers":[{"name":"nodexo","email":"dev@nodexo.net"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/xpipe-1.0.0.tgz_1472886619232_0.17295515956357121"},"directories":{},"publish_time":1472886621012,"_cnpm_publish_time":1472886621012,"_hasShrinkwrap":false}},"readme":"\nxpipe<sup>[1]</sup>\n===================\n\nUse cross-platform IPC paths in node.\n\nBackground\n----------\n\nIn node - instead of using TCP - you can also take IPC<sup>[2]</sup> to communicate to services like\n\n- web servers (NGINX)\n- data structure stores (redis)\n- databases (MongoDB, Cassandra)\n- etc.\n\nor to interconnect node apps, Electron frontends/backends etc.  \n\n**This can lead to large speed gains.**\n\nOn unixoid operating systems - e.g. Linux and OS X - we use [Unix domain sockets](https://en.wikipedia.org/wiki/Unix_domain_socket) \nthat are referred by file descriptors.  \nWindows has [named pipes](https://en.wikipedia.org/wiki/Named_pipe) for it, living \nin the root directory of the NPFS<sup>[3]</sup>, mounted under the special path \\\\\\\\.\\\\pipe\\\\.\n\n**To mitigate these differences and to to support writing portable code, xpipe was born...**\n\nInstallation\n------------\n\n    npm install xpipe\n\n\nUsage\n-----\n\n```javascript\nconst xpipe = require('xpipe');\n\nlet prefix = xpipe.prefix;\nconsole.log( `prefix:  ${prefix}` );\n/*\n  [empty string] on Linux and OS X\n  \"//./pipe/\" on Windows\n*/\n\nlet ipcPath = xpipe.eq('/tmp/my.sock');\nconsole.log( `ipcPath: ${ipcPath}` );\n/*\n  \"/tmp/my.sock\" on Linux and OS X\n  \"//./pipe/tmp/my.sock\" on Windows\n*/\n```\n\nWhen did Windows start accepting forward slash as a path separator?\n-------------------------------------------------------------------\n\nEvery Windows API/kernel ever has accepted \"/\" as a path separator.\nSo has every version of MS-DOS beginning with DOS 2.0 (the first version \nto support subdirectories).\n\nIt's only been in command lines that \"/\" was not allowed when it had\nalready been used as a switch delimiter in MS-DOS 1.0 (introduced by IBM).\n\nThis behaviour could be bypassed (at least on modern Windows systems) by including \nthe path in double quotation marks:\n- **cd c:/Windows** and **cd /Windows** work<sup>[4]</sup>\n- **dir ./ /B** fails but **dir \"./\" /B** works\n\nFurther articles: \n- https://en.m.wikipedia.org/wiki/Path_(computing)\n\n<p>&nbsp;</p> \n  \n[1]: xpipe stands for **xp (cross-platform) IPC path equalizer**  \n[2]: inter-process communication, see https://en.wikipedia.org/wiki/Inter-process_communication  \n[3]: named pipe file system (in-memory)  \n[4]: on Windows \"/\" without a leading drive letter represents the root of the current drive  \n","_attachments":{},"homepage":"https://github.com/nodexo/xpipe#readme","bugs":{"url":"https://github.com/nodexo/xpipe/issues"},"license":"MIT"}