{"_id":"meta-path","_rev":"108-a088e3a39c87b6cd683de03727898a28","name":"meta-path","description":"Provides metadata information about resource paths (file system and shared network)","dist-tags":{"latest":"0.0.8"},"versions":{"0.0.1":{"name":"meta-path","version":"0.0.1","description":"Provides metadata information about file system paths and fixes the relative path issue","keywords":["meta","fs","path","relative","absolute","unc"],"author":{"name":"Gabriel Llamas"},"repository":{"type":"git","url":"git://github.com/Gagle/Node-MetaPath.git"},"engines":{"node":"*"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/mit-license.html"}],"main":"meta-path","_id":"meta-path@0.0.1","readme":"ERROR: No README.md file found!","dist":{"shasum":"cbf28648c0be219ac4e67662c4dceecf7f0d9ef0","tarball":"https://registry.npmjs.org/meta-path/-/meta-path-0.0.1.tgz","integrity":"sha512-NpftcFO5WRvpJKVTXpg+3O1QGvW2uGZO2dspnBgN3zlABcWnoMjZY80vA0Yo+VKug/uXtlqGQWA5qQtJqhiMsQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFiPpjovJT3sBS9kJAqISgw7L8DvG/rrO50jp04+FnyUAiBUB7EK/9VCfQQm5MTt3xa/PFisiRRaMaINL7Ap6XtYpw=="}]},"_npmVersion":"1.1.66","_npmUser":{"name":"Gagle","email":"gaglekas@gmail.com"},"maintainers":[{"name":"Gagle","email":"gaglekas@gmail.com"}],"directories":{},"deprecated":"use rwd"},"0.0.2":{"name":"meta-path","version":"0.0.2","description":"Provides metadata information about resource paths (file system and shared network)","keywords":["meta","fs","path","relative","absolute","unc","network","resource","fix","__dirname","backward","compatibility"],"author":{"name":"Gabriel Llamas","email":"gaglekas@gmail.com"},"repository":{"type":"git","url":"git://github.com/Gagle/Node-MetaPath.git"},"engines":{"node":"*"},"dependencies":{"is-global":"*"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/mit-license.html"}],"main":"meta-path","readme":"meta-path\r\n=========\r\n\r\n_Node.js project_\r\n\r\n#### Provides metadata information about resource paths (file system and shared network) ####\r\n\r\nVersion: 0.0.2\r\n\r\nThe `path.normalize()` function has a lot of bugs when dealing with Windows UNC paths. Its result is not consistent between equivalent paths nor between Windows and Linux nor between Node.js versions themselves. What a mess!\r\n\r\nTry to execute this code in Node.js v0.6.x both on Windows and Linux, you'll be astonished with the different results when in fact, both paths should be normalized to `//a/b`.\r\n\r\n```javascript\r\nvar path = require (\"path\");\r\nconsole.log (path.normalize (\"//a/b\"));\r\nconsole.log (path.normalize (\"//a//b\"));\r\n```\r\n\r\nNode.js developpers are aware of these bugs (see [#3066](https://github.com/joyent/node/issues/3066) and [#3610](https://github.com/joyent/node/issues/3610)).\r\n\r\nFurthermore, did you know why you always see the concatenation of `__dirname` with a path? It's because the `process.cwd()` function returns the shell's current working directory instead of the home path of your application.\r\n\r\n```\r\n$ pwd\r\n/home/gll\r\n$ mkdir a\r\n$ cat > a/app.js\r\nconsole.log (process.cwd ())\r\n$ node a/app.js\r\n/home/gll\r\n```\r\n\r\nAs you see, the project base path \"should\" be `/home/gll/a`. If you don't understand this simple feature and use any built-in function found in the `fs` module you application will be broken. It's not the same `fs.existsSync(\"app.js\")` if you are in `/home/gll` or in `home/gll/a`. In the first case, the function will return false and in the second case it will return true. If you prefix the path with `__dirname` the function will work in both cases, `fs.existsSync(__dirname + \"/app.js\")`.\r\n\r\nThis solution is correct if you're not writing a third-party module, `__dirname` has a local significance, it contains the absolute path of the directory from where `__dirname` is executed, that is, if it's used in `/home/gll/a/app.js` it will contain `/home/gll/a` if we follow with the previous example.\r\n\r\nThis library aims to fix all the path bugs to provide a backward compatibility, be consistent between Windows and Linux and resolve the relative path issue for third-party modules.\r\n\r\n#### Installation ####\r\n\r\n```\r\nnpm install meta-path\r\n```\r\n\r\n#### Example ####\r\n\r\n```javascript\r\nvar meta = require (\"meta-path\");\r\n\r\n//Relative\r\nprocess.chdir (\"..\");\r\nconsole.log (meta (\"D:a/b\"));\r\n\r\n/*\r\nPrints (Windows backslashes, Linux slashes):\r\n\r\n{\r\n\tisAbsolute: false,\r\n\tisNetworkResource: false,\r\n\tisRelative: true,\r\n\tnormalized: \"D:a\\\\b\",\r\n\tprefix: \"D:\",\r\n\tnormalizedPathWithoutPrefix: \"\\\\a\\\\b\",\r\n\trelativeFix: \"meta-path\",\r\n\tnormalizedFixed: \"D:meta-path\\\\a\\\\b\"\r\n}\r\n*/\r\n\r\n//Absolute\r\nconsole.log (meta (\"D:/a/b\"));\r\n\r\n/*\r\nPrints (Windows backslashes, Linux slashes):\r\n\r\n{\r\n\tisAbsolute: true,\r\n\tisNetworkResource: false,\r\n\tisRelative: false,\r\n\tnormalized: \"D:\\\\a\\\\b\",\r\n\tprefix: \"D:\",\r\n\tnormalizedPathWithoutPrefix: \"\\\\\\\\a\\\\b\"\r\n}\r\n*/\r\n\r\n//Shared network\r\nconsole.log (meta (\"smb://a/b\"));\r\n\r\n/*\r\nPrints (Windows backslashes, Linux slashes):\r\n\r\n{\r\n\tisAbsolute: false,\r\n\tisNetworkResource: true,\r\n\tisRelative: false,\r\n\tnormalized: \"smb:\\\\\\\\a\\\\b\",\r\n\tprefix: \"smb:\",\r\n\tnormalizedPathWithoutPrefix: \"\\\\\\\\a\\\\b\"\r\n}\r\n*/\r\n```","readmeFilename":"README.md","_id":"meta-path@0.0.2","dist":{"shasum":"fd46391f9988d9db932c27e509dff43f5d8b52f9","tarball":"https://registry.npmjs.org/meta-path/-/meta-path-0.0.2.tgz","integrity":"sha512-4ZPTOQW6Dkqbpzw2yIfyjjqUCePL14dtWCbBygq9kGYNX5Xjc/kKoW8KNDs2PBSjA7LSLYR6uKmSmbfDUVMilQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB26kh6t743oAQlfvvdrTsIWSDh6hu5tgukGUoFg22xuAiAoToEOhFkOggRtzM9tuh7NCXmXDrQhsEkenKJrSt9pVw=="}]},"_npmVersion":"1.1.66","_npmUser":{"name":"Gagle","email":"gaglekas@gmail.com"},"maintainers":[{"name":"Gagle","email":"gaglekas@gmail.com"}],"directories":{},"deprecated":"use rwd"},"0.0.3":{"name":"meta-path","version":"0.0.3","description":"Provides metadata information about resource paths (file system and shared network)","keywords":["meta","fs","path","relative","absolute","unc","network","resource","fix","__dirname","backward","compatibility"],"author":{"name":"Gabriel Llamas","email":"gaglekas@gmail.com"},"repository":{"type":"git","url":"git://github.com/Gagle/Node-MetaPath.git"},"engines":{"node":"*"},"dependencies":{"is-global":"*"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/mit-license.html"}],"main":"meta-path","readme":"meta-path\r\n=========\r\n\r\n_Node.js project_\r\n\r\n#### Provides metadata information about resource paths (file system and shared network) ####\r\n\r\nVersion: 0.0.3\r\n\r\nThe `path.normalize()` function has a lot of bugs when dealing with Windows UNC paths. Its result is not consistent between equivalent paths nor between Windows and Linux nor between Node.js versions themselves. What a mess!\r\n\r\nTry to execute this code in Node.js v0.6.x both on Windows and Linux, you'll be astonished with the different results when in fact, both paths should be normalized to `//a/b`.\r\n\r\n```javascript\r\nvar path = require (\"path\");\r\nconsole.log (path.normalize (\"//a/b\"));\r\nconsole.log (path.normalize (\"//a//b\"));\r\n```\r\n\r\nNode.js developpers are aware of these bugs (see [#3066](https://github.com/joyent/node/issues/3066) and [#3610](https://github.com/joyent/node/issues/3610)).\r\n\r\nFurthermore, did you know why you always see the concatenation of `__dirname` with a path? It's because the `process.cwd()` function returns the shell's current working directory instead of the home path of your application.\r\n\r\n```\r\n$ pwd\r\n/home/gll\r\n$ mkdir a\r\n$ cat > a/app.js\r\nconsole.log (process.cwd ())\r\n$ node a/app.js\r\n/home/gll\r\n```\r\n\r\nAs you see, the project base path \"should\" be `/home/gll/a`. If you don't understand this simple feature and use any built-in function found in the `fs` module you application will be broken. It's not the same `fs.existsSync(\"app.js\")` if you are in `/home/gll` or in `home/gll/a`. In the first case, the function will return false and in the second case it will return true. If you prefix the path with `__dirname` the function will work in both cases, `fs.existsSync(__dirname + \"/app.js\")`.\r\n\r\nThis solution is correct if you're not writing a third-party module, `__dirname` has a local significance, it contains the absolute path of the directory from where `__dirname` is executed, that is, if it's used in `/home/gll/a/app.js` it will contain `/home/gll/a` if we follow with the previous example.\r\n\r\nThis library aims to fix all the path bugs to provide a backward compatibility, be consistent between Windows and Linux and resolve the relative path issue for third-party modules.\r\n\r\n#### Installation ####\r\n\r\n```\r\nnpm install meta-path\r\n```\r\n\r\n#### Example ####\r\n\r\n```javascript\r\nvar meta = require (\"meta-path\");\r\n\r\n//Relative\r\nprocess.chdir (\"..\");\r\nconsole.log (meta (\"D:a/b\"));\r\n\r\n/*\r\nPrints (Windows backslashes, Linux slashes):\r\n\r\n{\r\n\tisAbsolute: false,\r\n\tisNetworkResource: false,\r\n\tisRelative: true,\r\n\tnormalized: \"D:a\\\\b\",\r\n\tprefix: \"D:\",\r\n\tnormalizedPathWithoutPrefix: \"\\\\a\\\\b\",\r\n\trelativeFix: \"meta-path\",\r\n\tnormalizedFixed: \"D:meta-path\\\\a\\\\b\"\r\n}\r\n*/\r\n\r\n//Absolute\r\nconsole.log (meta (\"D:/a/b\"));\r\n\r\n/*\r\nPrints (Windows backslashes, Linux slashes):\r\n\r\n{\r\n\tisAbsolute: true,\r\n\tisNetworkResource: false,\r\n\tisRelative: false,\r\n\tnormalized: \"D:\\\\a\\\\b\",\r\n\tprefix: \"D:\",\r\n\tnormalizedPathWithoutPrefix: \"\\\\\\\\a\\\\b\"\r\n}\r\n*/\r\n\r\n//Shared network\r\nconsole.log (meta (\"smb://a/b\"));\r\n\r\n/*\r\nPrints (Windows backslashes, Linux slashes):\r\n\r\n{\r\n\tisAbsolute: false,\r\n\tisNetworkResource: true,\r\n\tisRelative: false,\r\n\tnormalized: \"smb:\\\\\\\\a\\\\b\",\r\n\tprefix: \"smb:\",\r\n\tnormalizedPathWithoutPrefix: \"\\\\\\\\a\\\\b\"\r\n}\r\n*/\r\n```","readmeFilename":"README.md","_id":"meta-path@0.0.3","dist":{"shasum":"561f9f4ebbf4156319e28d47737d837353051ce5","tarball":"https://registry.npmjs.org/meta-path/-/meta-path-0.0.3.tgz","integrity":"sha512-fqeU36qt0fm1sriUp3HTDHVJSFI+WZuZMLi31ZxMDCo+K2twLAX1mIkvpRot2BnFHW9sams4yCD9JFH4SY/ZBA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBUQen8fZ4R6wIezptiflmESeGR4sX6VamUzkaznZSAxAiEA6ZK1nVXB/GQ5sB7XTpgklZatm4JxeOCCIRIeMfssGHo="}]},"_npmVersion":"1.1.66","_npmUser":{"name":"Gagle","email":"gaglekas@gmail.com"},"maintainers":[{"name":"Gagle","email":"gaglekas@gmail.com"}],"directories":{},"deprecated":"use rwd"},"0.0.4":{"name":"meta-path","version":"0.0.4","description":"Provides metadata information about resource paths (file system and shared network)","keywords":["meta","fs","path","relative","absolute","unc","network","resource","fix","__dirname","backward","compatibility"],"author":{"name":"Gabriel Llamas","email":"gaglekas@gmail.com"},"repository":{"type":"git","url":"git://github.com/Gagle/Node-MetaPath.git"},"engines":{"node":"*"},"dependencies":{"is-global":"*"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/mit-license.html"}],"main":"meta-path","readme":"meta-path\r\n=========\r\n\r\n_Node.js project_\r\n\r\n#### Provides metadata information about resource paths (file system and shared network) ####\r\n\r\nVersion: 0.0.4\r\n\r\nThe `path.normalize()` function has a lot of bugs when dealing with Windows UNC paths. Its result is not consistent between equivalent paths nor between Windows and Linux nor between Node.js versions themselves. What a mess!\r\n\r\nTry to execute this code in Node.js v0.6.x both on Windows and Linux, you'll be astonished with the different results when in fact, both paths should be normalized to `//a/b`.\r\n\r\n```javascript\r\nvar path = require (\"path\");\r\nconsole.log (path.normalize (\"//a/b\"));\r\nconsole.log (path.normalize (\"//a//b\"));\r\n```\r\n\r\nNode.js developpers are aware of these bugs (see [#3066](https://github.com/joyent/node/issues/3066) and [#3610](https://github.com/joyent/node/issues/3610)).\r\n\r\nFurthermore, did you know why you always see the concatenation of `__dirname` with a path? It's because the `process.cwd()` function returns the shell's current working directory instead of the home path of your application.\r\n\r\n```\r\n$ pwd\r\n/home/gll\r\n$ mkdir a\r\n$ cat > a/app.js\r\nconsole.log (process.cwd ())\r\n$ node a/app.js\r\n/home/gll\r\n```\r\n\r\nAs you see, the project base path \"should\" be `/home/gll/a`. If you don't understand this simple feature and use any built-in function found in the `fs` module you application will be broken. It's not the same `fs.existsSync(\"app.js\")` if you are in `/home/gll` or in `home/gll/a`. In the first case, the function will return false and in the second case it will return true. If you prefix the path with `__dirname` the function will work in both cases, `fs.existsSync(__dirname + \"/app.js\")`.\r\n\r\nThis solution is correct if you're not writing a third-party module, `__dirname` has a local significance, it contains the absolute path of the directory from where `__dirname` is executed, that is, if it's used in `/home/gll/a/app.js` it will contain `/home/gll/a` if we follow with the previous example.\r\n\r\nThis library aims to fix all the path bugs to provide a backward compatibility, be consistent between Windows and Linux and resolve the relative path issue for third-party modules.\r\n\r\n#### Installation ####\r\n\r\n```\r\nnpm install meta-path\r\n```\r\n\r\n#### Example ####\r\n\r\n```javascript\r\nvar meta = require (\"meta-path\");\r\n\r\n//Relative\r\nprocess.chdir (\"..\");\r\nconsole.log (meta (\"D:a/b\"));\r\n\r\n/*\r\nPrints (Windows backslashes, Linux slashes):\r\n\r\n{\r\n\tisAbsolute: false,\r\n\tisNetwork: false,\r\n\tisRelative: true,\r\n\tnormalized: \"D:a\\\\b\",\r\n\tprefix: \"D:\",\r\n\tnormalizedWithoutPrefix: \"\\\\a\\\\b\",\r\n\trelativeFix: \"meta-path\",\r\n\tnormalizedFixed: \"D:meta-path\\\\a\\\\b\",\r\n\tnormalizedFixedWithoutPrefix: \"meta-path\\\\a\\\\b\"\r\n}\r\n*/\r\n\r\n//Absolute\r\nconsole.log (meta (\"D:/a/b\"));\r\n\r\n/*\r\nPrints (Windows backslashes, Linux slashes):\r\n\r\n{\r\n\tisAbsolute: true,\r\n\tisNetwork: false,\r\n\tisRelative: false,\r\n\tnormalized: \"D:\\\\a\\\\b\",\r\n\tprefix: \"D:\",\r\n\tnormalizedWithoutPrefix: \"\\\\\\\\a\\\\b\"\r\n}\r\n*/\r\n\r\n//Shared network\r\nconsole.log (meta (\"smb://a/b\"));\r\n\r\n/*\r\nPrints (Windows backslashes, Linux slashes):\r\n\r\n{\r\n\tisAbsolute: false,\r\n\tisNetwork: true,\r\n\tisRelative: false,\r\n\tnormalized: \"smb:\\\\\\\\a\\\\b\",\r\n\tprefix: \"smb:\",\r\n\tnormalizedWithoutPrefix: \"\\\\\\\\a\\\\b\"\r\n}\r\n*/\r\n```","readmeFilename":"README.md","_id":"meta-path@0.0.4","dist":{"shasum":"d6996d788bf13905e03b231d3574bfcb705d396b","tarball":"https://registry.npmjs.org/meta-path/-/meta-path-0.0.4.tgz","integrity":"sha512-fvW+EkKZKCD1EH/9OCT4WNKzvzCj2w3irgwF+0jksLEgw2Qits65wkkoPTIlDKF3XKx9+MxIBrtNb6K8XZ3iRg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCLsPKoCIDt5hW6ViEYe4gr9FOEAEoPaDuxWVesxU8p5gIgTFlRYz85Kv5/tauamZq5WUumFFYJxiG2fPgOoBOr+jQ="}]},"_npmVersion":"1.1.66","_npmUser":{"name":"Gagle","email":"gaglekas@gmail.com"},"maintainers":[{"name":"Gagle","email":"gaglekas@gmail.com"}],"directories":{},"deprecated":"use rwd"},"0.0.5":{"name":"meta-path","version":"0.0.5","description":"Provides metadata information about resource paths (file system and shared network)","keywords":["meta","fs","path","relative","absolute","unc","network","resource","fix","__dirname","backward","compatibility"],"author":{"name":"Gabriel Llamas","email":"gaglekas@gmail.com"},"repository":{"type":"git","url":"git://github.com/Gagle/Node-MetaPath.git"},"engines":{"node":"*"},"dependencies":{"is-global":"*"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/mit-license.html"}],"main":"meta-path","readme":"meta-path\r\n=========\r\n\r\n_Node.js project_\r\n\r\n#### Provides metadata information about resource paths (file system and shared network) ####\r\n\r\nVersion: 0.0.5\r\n\r\nThe `path.normalize()` function has a lot of bugs when dealing with Windows UNC paths. Its result is not consistent between equivalent paths nor between Windows and Linux nor between Node.js versions themselves. What a mess!\r\n\r\nTry to execute this code in Node.js v0.6.x both on Windows and Linux, you'll be astonished with the different results when in fact, both paths should be normalized to `//a/b`.\r\n\r\n```javascript\r\nvar path = require (\"path\");\r\nconsole.log (path.normalize (\"//a/b\"));\r\nconsole.log (path.normalize (\"//a//b\"));\r\n```\r\n\r\nNode.js developpers are aware of these bugs (see [#3066](https://github.com/joyent/node/issues/3066) and [#3610](https://github.com/joyent/node/issues/3610)).\r\n\r\nFurthermore, did you know why you always see the concatenation of `__dirname` with a path? It's because the `process.cwd()` function returns the shell's current working directory instead of the home path of your application.\r\n\r\n```\r\n$ pwd\r\n/home/gll\r\n$ mkdir a\r\n$ cat > a/app.js\r\nconsole.log (process.cwd ())\r\n$ node a/app.js\r\n/home/gll\r\n```\r\n\r\nAs you see, the project base path \"should\" be `/home/gll/a`. If you don't understand this simple feature and use any built-in function found in the `fs` module you application will be broken. It's not the same `fs.existsSync(\"app.js\")` if you are in `/home/gll` or in `home/gll/a`. In the first case, the function will return false and in the second case it will return true. If you prefix the path with `__dirname` the function will work in both cases, `fs.existsSync(__dirname + \"/app.js\")`.\r\n\r\nThis solution is correct if you're not writing a third-party module, `__dirname` has a local significance, it contains the absolute path of the directory from where `__dirname` is executed, that is, if it's used in `/home/gll/a/app.js` it will contain `/home/gll/a` if we follow with the previous example.\r\n\r\nThis library aims to fix all the path bugs to provide a backward compatibility, be consistent between Windows and Linux and resolve the relative path issue for third-party modules.\r\n\r\n#### Installation ####\r\n\r\n```\r\nnpm install meta-path\r\n```\r\n\r\n#### Example ####\r\n\r\n```javascript\r\nvar meta = require (\"meta-path\");\r\n\r\nprocess.chdir (\"..\");\r\n\r\n//If you only want to get the current working directory fix (faster than calling meta()):\r\nconsole.log (meta.fix ());\r\n\r\n/*\r\nPrints: \"meta-path\"\r\n*/\r\n\r\n//Relative\r\nconsole.log (meta (\"D:a/b\"));\r\n\r\n/*\r\nPrints (Windows backslashes, Linux slashes):\r\n\r\n{\r\n\tisAbsolute: false,\r\n\tisNetwork: false,\r\n\tisRelative: true,\r\n\tnormalized: \"D:a\\\\b\",\r\n\tprefix: \"D:\",\r\n\tnormalizedWithoutPrefix: \"\\\\a\\\\b\",\r\n\trelativeFix: \"meta-path\",\r\n\tnormalizedFixed: \"D:meta-path\\\\a\\\\b\",\r\n\tnormalizedFixedWithoutPrefix: \"meta-path\\\\a\\\\b\"\r\n}\r\n*/\r\n\r\n//Absolute\r\nconsole.log (meta (\"D:/a/b\"));\r\n\r\n/*\r\nPrints (Windows backslashes, Linux slashes):\r\n\r\n{\r\n\tisAbsolute: true,\r\n\tisNetwork: false,\r\n\tisRelative: false,\r\n\tnormalized: \"D:\\\\a\\\\b\",\r\n\tprefix: \"D:\",\r\n\tnormalizedWithoutPrefix: \"\\\\\\\\a\\\\b\"\r\n}\r\n*/\r\n\r\n//Shared network\r\nconsole.log (meta (\"smb://a/b\"));\r\n\r\n/*\r\nPrints (Windows backslashes, Linux slashes):\r\n\r\n{\r\n\tisAbsolute: false,\r\n\tisNetwork: true,\r\n\tisRelative: false,\r\n\tnormalized: \"smb:\\\\\\\\a\\\\b\",\r\n\tprefix: \"smb:\",\r\n\tnormalizedWithoutPrefix: \"\\\\\\\\a\\\\b\"\r\n}\r\n*/\r\n```","readmeFilename":"README.md","_id":"meta-path@0.0.5","dist":{"shasum":"7659a48f0b750dddaafb437f5a6171ce29bd13a3","tarball":"https://registry.npmjs.org/meta-path/-/meta-path-0.0.5.tgz","integrity":"sha512-1xEstxcgPALiEkMuG/EuYNPRkPzChBfPAlnsWk0FEHa6I4W37z5Zn+Mbp9I04ElJSY/77Nhw3Jz2DVU3NGHORg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD5ieMjQIoXv37E0vaiRWoCceXVmfKEQyGcp/1ArcSIKAIgOyyMbXnC3oMbgvb4DolIvfqKbRdL8UIXI1VqNqiEous="}]},"_npmVersion":"1.1.66","_npmUser":{"name":"Gagle","email":"gaglekas@gmail.com"},"maintainers":[{"name":"Gagle","email":"gaglekas@gmail.com"}],"directories":{},"deprecated":"use rwd"},"0.0.6":{"name":"meta-path","version":"0.0.6","description":"Provides metadata information about resource paths (file system and shared network)","keywords":["meta","fs","path","relative","absolute","unc","network","resource","fix","__dirname","backward","compatibility"],"author":{"name":"Gabriel Llamas","email":"gaglekas@gmail.com"},"repository":{"type":"git","url":"git://github.com/Gagle/Node-MetaPath.git"},"engines":{"node":"*"},"dependencies":{"is-global":"*"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/mit-license.html"}],"main":"meta-path","readme":"meta-path\r\n=========\r\n\r\n_Node.js project_\r\n\r\n#### Provides metadata information about resource paths (file system and shared network) ####\r\n\r\nVersion: 0.0.6\r\n\r\nThe `path.normalize()` function has a lot of bugs when dealing with Windows UNC paths. Its result is not consistent between equivalent paths nor between Windows and Linux nor between Node.js versions themselves. What a mess!\r\n\r\nTry to execute this code in Node.js v0.6.x both on Windows and Linux, you'll be astonished with the different results when in fact, both paths should be normalized to `//a/b`.\r\n\r\n```javascript\r\nvar path = require (\"path\");\r\nconsole.log (path.normalize (\"//a/b\"));\r\nconsole.log (path.normalize (\"//a//b\"));\r\n```\r\n\r\nNode.js developpers are aware of these bugs (see [#3066](https://github.com/joyent/node/issues/3066) and [#3610](https://github.com/joyent/node/issues/3610)).\r\n\r\nFurthermore, did you know why you always see the concatenation of `__dirname` with a path? It's because the `process.cwd()` function returns the shell's current working directory instead of the home path of your application.\r\n\r\n```\r\n$ pwd\r\n/home/gll\r\n$ mkdir a\r\n$ cat > a/app.js\r\nconsole.log (process.cwd ())\r\n$ node a/app.js\r\n/home/gll\r\n```\r\n\r\nAs you see, the project base path \"should\" be `/home/gll/a`. If you don't understand this simple feature and use any built-in function found in the `fs` module you application will be broken. It's not the same `fs.existsSync(\"app.js\")` if you are in `/home/gll` or in `home/gll/a`. In the first case, the function will return false and in the second case it will return true. If you prefix the path with `__dirname` the function will work in both cases, `fs.existsSync(__dirname + \"/app.js\")`.\r\n\r\nThis solution is correct if you're not writing a third-party module, `__dirname` has a local significance, it contains the absolute path of the directory from where `__dirname` is executed, that is, if it's used in `/home/gll/a/app.js` it will contain `/home/gll/a` if we follow with the previous example.\r\n\r\nThis library aims to fix all the path bugs to provide a backward compatibility, be consistent between Windows and Linux and resolve the relative path issue for third-party modules.\r\n\r\n#### Installation ####\r\n\r\n```\r\nnpm install meta-path\r\n```\r\n\r\n#### Example ####\r\n\r\n```javascript\r\nvar meta = require (\"meta-path\");\r\n\r\nprocess.chdir (\"..\");\r\n\r\n//If you only want to get the current working directory fix (faster than calling meta()):\r\nconsole.log (meta.fix ());\r\n\r\n/*\r\nPrints: \"meta-path\"\r\n*/\r\n\r\n//If you only want to check if a path is absolute, network or relative (faster than calling meta()):\r\n//The path doesn't need to be normalized\r\nconsole.log (meta.isRelative (\"a\"));\r\nconsole.log (meta.isAbsolute (\"/a\"));\r\nconsole.log (meta.isNetwork (\"//a\"));\r\n\r\n/*\r\nPrints:\r\n\r\ntrue\r\ntrue\r\ntrue\r\n*/\r\n\r\n//Relative\r\nconsole.log (meta (\"D:a/b\"));\r\n\r\n/*\r\nPrints (Windows backslashes, Linux slashes):\r\n\r\n{\r\n\tisAbsolute: false,\r\n\tisNetwork: false,\r\n\tisRelative: true,\r\n\tnormalized: \"D:a\\\\b\",\r\n\tprefix: \"D:\",\r\n\tnormalizedWithoutPrefix: \"\\\\a\\\\b\",\r\n\trelativeFix: \"meta-path\",\r\n\tnormalizedFixed: \"D:meta-path\\\\a\\\\b\",\r\n\tnormalizedFixedWithoutPrefix: \"meta-path\\\\a\\\\b\"\r\n}\r\n*/\r\n\r\n//Absolute\r\nconsole.log (meta (\"D:/a/b\"));\r\n\r\n/*\r\nPrints (Windows backslashes, Linux slashes):\r\n\r\n{\r\n\tisAbsolute: true,\r\n\tisNetwork: false,\r\n\tisRelative: false,\r\n\tnormalized: \"D:\\\\a\\\\b\",\r\n\tprefix: \"D:\",\r\n\tnormalizedWithoutPrefix: \"\\\\\\\\a\\\\b\"\r\n}\r\n*/\r\n\r\n//Shared network\r\nconsole.log (meta (\"smb://a/b\"));\r\n\r\n/*\r\nPrints (Windows backslashes, Linux slashes):\r\n\r\n{\r\n\tisAbsolute: false,\r\n\tisNetwork: true,\r\n\tisRelative: false,\r\n\tnormalized: \"smb:\\\\\\\\a\\\\b\",\r\n\tprefix: \"smb:\",\r\n\tnormalizedWithoutPrefix: \"\\\\\\\\a\\\\b\"\r\n}\r\n*/\r\n```","readmeFilename":"README.md","_id":"meta-path@0.0.6","dist":{"shasum":"00aae52b045ac69e9f018109f6178072c22d49b9","tarball":"https://registry.npmjs.org/meta-path/-/meta-path-0.0.6.tgz","integrity":"sha512-VneVk+93pjQ6SnF1DUHXvTkdscewHJZIwNArNLlEvdFFV3Toj5ZJ1S/lwAP1vrJ8BeN/H8RThlxO3S0w5SdPDA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE0i2qLZZUrjSeLXtainko558D2PDV8X+46cP45mITILAiEA/fUZDcEjb89ryVddpLOvVfQio8D5WqaXklD2Co0BCyc="}]},"_npmVersion":"1.1.66","_npmUser":{"name":"Gagle","email":"gaglekas@gmail.com"},"maintainers":[{"name":"Gagle","email":"gaglekas@gmail.com"}],"directories":{},"deprecated":"use rwd"},"0.0.7":{"name":"meta-path","version":"0.0.7","description":"Provides metadata information about resource paths (file system and shared network)","keywords":["meta","fs","path","relative","absolute","unc","network","resource","fix","__dirname","backward","compatibility"],"author":{"name":"Gabriel Llamas","email":"gaglekas@gmail.com"},"repository":{"type":"git","url":"git://github.com/Gagle/Node-MetaPath.git"},"engines":{"node":"*"},"dependencies":{"is-global":"*"},"devDependencies":{"mocha-runner":"*"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/mit-license.html"}],"main":"lib/meta-path","readme":"meta-path\r\n=========\r\n\r\n_Node.js project_\r\n\r\n#### Provides metadata information about resource paths (file system and shared network) ####\r\n\r\nVersion: 0.0.7\r\n\r\nThe `path.normalize()` function has a lot of bugs when dealing with Windows UNC paths. Its result is not consistent between equivalent paths nor between Windows and Linux nor between Node.js versions themselves. What a mess!\r\n\r\nTry to execute this code in Node.js v0.6.x both on Windows and Linux, you'll be astonished with the different results when in fact, both paths should be normalized to `//a/b`.\r\n\r\n```javascript\r\nvar path = require (\"path\");\r\nconsole.log (path.normalize (\"//a/b\"));\r\nconsole.log (path.normalize (\"//a//b\"));\r\n```\r\n\r\nNode.js developpers are aware of these bugs (see [#3066](https://github.com/joyent/node/issues/3066) and [#3610](https://github.com/joyent/node/issues/3610)).\r\n\r\nFurthermore, did you know why you always see the concatenation of `__dirname` with a path? It's because the `process.cwd()` function returns the shell's current working directory instead of the home path of your application.\r\n\r\n```\r\n$ pwd\r\n/home/gll\r\n$ mkdir a\r\n$ cat > a/app.js\r\nconsole.log (process.cwd ())\r\n$ node a/app.js\r\n/home/gll\r\n```\r\n\r\nAs you see, the project base path \"should\" be `/home/gll/a`. If you don't understand this simple feature and use any built-in function found in the `fs` module you application will be broken. It's not the same `fs.existsSync(\"app.js\")` if you are in `/home/gll` or in `home/gll/a`. In the first case, the function will return false and in the second case it will return true. If you prefix the path with `__dirname` the function will work in both cases, `fs.existsSync(__dirname + \"/app.js\")`.\r\n\r\nThis solution is correct if you're not writing a third-party module, `__dirname` has a local significance, it contains the absolute path of the directory from where `__dirname` is executed, that is, if it's used in `/home/gll/a/app.js` it will contain `/home/gll/a`. If `__dirname` is used within a third-party module it will point to a directory inside `node_modules`.\r\n\r\nThis library aims to fix all the path bugs to provide a backward compatibility, be consistent between Windows and Linux and resolve the relative path issue for third-party modules.\r\n\r\nTo permanently fix the relative path issue you can write the following code snippet at the very top of the main script:\r\n\r\n```javascript\r\nvar fix = meta.fix ();\r\nif (fix) process.chdir (fix);\r\n```\r\n\r\nNow all the relative paths will be referenced from the directory where the main script is located. It's an extremly fast solution if you only want to fix relative paths and the `process.cwd()` function, but it's error prone because you're changing the process current working directory, and you may have other modules that may stop working properly. Use with caution.\r\n\r\nI recommend the usage of [flavored-path](https://github.com/Gagle/Node-FlavoredPath) to treat with all kind of paths.\r\n\r\n#### Installation ####\r\n\r\n```\r\nnpm install meta-path\r\n```\r\n\r\n#### Example ####\r\n\r\n```javascript\r\nvar meta = require (\"meta-path\");\r\n\r\nprocess.chdir (\"..\");\r\n\r\n//If you only want to get the current working directory fix (faster than calling meta()):\r\nconsole.log (meta.fix ());\r\n\r\n/*\r\nPrints: \"meta-path\"\r\n*/\r\n\r\n//Relative\r\nconsole.log (meta (\"D:a/b\"));\r\n\r\n/*\r\nPrints (Windows backslashes, Linux slashes):\r\n\r\n{\r\n\tisAbsolute: false,\r\n\tisNetwork: false,\r\n\tisRelative: true,\r\n\tnormalized: \"D:a\\\\b\",\r\n\tprefix: \"D:\",\r\n\tnormalizedWithoutPrefix: \"a\\\\b\",\r\n\trelativeFix: \"meta-path\",\r\n\tnormalizedFixed: \"D:meta-path\\\\a\\\\b\",\r\n\tnormalizedFixedWithoutPrefix: \"meta-path\\\\a\\\\b\"\r\n}\r\n*/\r\n\r\n//Absolute\r\nconsole.log (meta (\"D:/a/b\"));\r\n\r\n/*\r\nPrints (Windows backslashes, Linux slashes):\r\n\r\n{\r\n\tisAbsolute: true,\r\n\tisNetwork: false,\r\n\tisRelative: false,\r\n\tnormalized: \"D:\\\\a\\\\b\",\r\n\tprefix: \"D:\",\r\n\tnormalizedWithoutPrefix: \"\\\\a\\\\b\"\r\n}\r\n*/\r\n\r\n//Shared network\r\nconsole.log (meta (\"smb://a/b\"));\r\n\r\n/*\r\nPrints (Windows backslashes, Linux slashes):\r\n\r\n{\r\n\tisAbsolute: false,\r\n\tisNetwork: true,\r\n\tisRelative: false,\r\n\tnormalized: \"smb:\\\\\\\\a\\\\b\",\r\n\tprefix: \"smb:\",\r\n\tnormalizedWithoutPrefix: \"\\\\\\\\a\\\\b\"\r\n}\r\n*/\r\n```","readmeFilename":"README.md","_id":"meta-path@0.0.7","dist":{"shasum":"21d88f11a63a532cb6cc2baa0c33ca7d21a24549","tarball":"https://registry.npmjs.org/meta-path/-/meta-path-0.0.7.tgz","integrity":"sha512-NsbIb3WI1Hxv6FzIsOm4VBp7TIkk//dBJXiNeJNpgPkj+g5CBmD6nDDX1Nm5EIoW1eRFQPv8ElpstW/ub1jY4g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEREV3geCZko4VsD/gj5Zvxy3TIVO1+iXQ0Zi1lNBfdCAiBzkyB3ADWd3zbNO98WxF8ZfdMrubJ7smH1iGBG5UWKlg=="}]},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"Gagle","email":"gaglekas@gmail.com"},"maintainers":[{"name":"Gagle","email":"gaglekas@gmail.com"}],"directories":{},"deprecated":"use rwd"},"0.0.8":{"name":"meta-path","version":"0.0.8","description":"Provides metadata information about resource paths (file system and shared network)","keywords":["meta","fs","path","relative","absolute","unc","network","resource","fix","__dirname","backward","compatibility"],"author":{"name":"Gabriel Llamas","email":"gaglekas@gmail.com"},"repository":{"type":"git","url":"git://github.com/Gagle/Node-MetaPath.git"},"engines":{"node":"*"},"dependencies":{"is-global":"*"},"devDependencies":{"mocha-runner":"*"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/mit-license.html"}],"main":"lib/meta-path","readme":"### Deprecated, see [rwd](https://github.com/gagle/node-rwd).","readmeFilename":"README.md","bugs":{"url":"https://github.com/Gagle/Node-MetaPath/issues"},"_id":"meta-path@0.0.8","dist":{"shasum":"dd72f5d40f559c622efa657ac02cd6764a475672","tarball":"https://registry.npmjs.org/meta-path/-/meta-path-0.0.8.tgz","integrity":"sha512-m4h5W3WMcwpuuwsfNJCswOT5C7Sfa6aFCSgVQDOX8KXd7h0IH+ztQ9ImfzUv/g/jmQUKMzA8u7vk1Hhpf4ERQw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHLrl7ZQvc0BIUizcKAdpUlVXK0ztXVR1VuPJX8cPzDeAiEA6oACjEkTAb2VEJx3Ci8Jz3xEErHXyRMl6LjgeoKYq5Q="}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"gagle","email":"gabriel_llamas_llopis@yahoo.es"},"maintainers":[{"name":"gagle","email":"gabriel_llamas_llopis@yahoo.es"}],"directories":{},"deprecated":"use rwd"}},"readme":"ERROR: No README.md file found!","maintainers":[{"name":"gagle","email":"gabriel_llamas_llopis@yahoo.es"}],"time":{"modified":"2022-06-19T18:07:22.132Z","created":"2012-11-27T11:24:03.620Z","0.0.1":"2012-11-27T11:24:09.078Z","0.0.2":"2012-12-06T14:05:01.119Z","0.0.3":"2012-12-06T17:42:36.099Z","0.0.4":"2012-12-06T20:43:31.482Z","0.0.5":"2012-12-06T23:16:50.482Z","0.0.6":"2012-12-07T15:03:55.135Z","0.0.7":"2013-01-26T08:18:31.438Z","0.0.8":"2013-07-20T12:43:25.525Z"},"author":{"name":"Gabriel Llamas","email":"gaglekas@gmail.com"},"repository":{"type":"git","url":"git://github.com/Gagle/Node-MetaPath.git"}}