{"name":"url-or-path","version":"0.0.0","main":"index.js","description":"","repository":{"type":"git","url":"git+https://github.com/fisker/url-or-path.git"},"author":{"name":"fisker Cheung","email":"lionkay@gmail.com","url":"https://www.fiskercheung.com/"},"license":"MIT","config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"devDependencies":{"@commitlint/cli":"13.1.0","@fisker/commitlint-config":"1.3.6","@fisker/eslint-config":"7.2.0","@fisker/husky-config":"4.1.0","@fisker/lint-staged-config":"3.1.0","@fisker/prettier-config":"4.1.1","cz-conventional-changelog":"3.3.0","del-cli":"4.0.1","eslint":"7.32.0","husky":"7.0.2","lint-staged":"11.1.2","markdownlint-cli":"0.28.1","npm-run-all":"4.1.5","prettier":"2.3.2","sort-package-json":"1.50.0"},"scripts":{"clean":"run-p clean:*","clean:dist":"del-cli dist","dist":"run-p dist:*","dist:npm":"np --yolo --no-yarn","format":"run-p format:*","format:eslint":"yarn lint:eslint --fix","format:markdown":"yarn lint:markdown --fix","format:package-json":"sort-package-json \"package.json\" \"packages/*/package.json\"","format:prettier":"yarn lint:prettier --write","lint":"run-p lint:*","lint:eslint":"eslint \"**/*.{js,mjs,cjs,vue}\"","lint:markdown":"markdownlint \"**/*.md\" --ignore \"**/node_modules/**\"","lint:package-json":"yarn run format:package-json --check","lint:prettier":"prettier \"**/*.{css,html,js,cjs,mjs,json,less,md,scss,ts,vue,yaml,yml}\" --check"},"type":"module","exports":"./index.js","publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"sideEffects":false,"homepage":"https://github.com/fisker/url-or-path#readme","bugs":{"url":"https://github.com/fisker/url-or-path/issues"},"funding":"https://github.com/fisker/url-or-path?sponsor=1","_id":"url-or-path@0.0.0","_nodeVersion":"16.7.0","_npmVersion":"7.9.0","dist":{"integrity":"sha512-JZMt56gikkmGXZWo3Ct1Is0zzknAw8bBUFLTkLWfAbQnxdM3zQ0zAi9gsp7ux3bIwOdMhe6iRXjR+xqfMGFWOw==","shasum":"d73187e1c5f532d2c36a57bfbece1fb52029b7be","tarball":"http://registry-npm.ywwl.com/url-or-path/download/url-or-path-0.0.0.tgz","fileCount":2,"unpackedSize":3162,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJbizCRA9TVsSAnZWagAABKEP/1TyCSUTQ3Rlh1xjFNQ6\nYfGlaM5n2aGWPagkXi6JcSOH9qxjyv2dWRFT2pzvcgE3aV+k7H06IF5z4MbF\noE3x6T9+j9hAkYvxsUf6A0FcX3i6uk+7nOux3wgPFe2+CeQOuIb25ShBmPUh\nSauLrOiStVQV9d9UwKDI92zVtx8EQf5A3K3Z6G5EFJFE6LtGhYnCyOLdy5fI\nZfThLS+UW6YUkq0lZw1Y7QONu7SKyvRGZymsccqeHTTkhg+/JryZRKpb4cvu\n8ZYX+XVF1CtWPWWOnWDO+ZrBTg8e/jPL5z/bTh5d+IbJBQPN6EGc3dabJRBB\nKSJJHzadjqsI0ukDgtmYiUh5y7ZWmitOPItuOCLgnoYMbXd/AvU1aHa7pDpE\nlsdGMXWANX4/rpDoGe6QMjG0bYUCiovYiNok/TEA87FmmuHJaqBuIoTeBCX5\nxg5IjALFoukQ86l5b4tw1C9nt2aMZyK9zRYlHP/ozDBCe9aBH14cC0LAZfuv\n9LE8wXKpfdGwyFQAqd8XAuwwhi4GqfUMAsXc+DmnHgUffaoq+Zfa36O3CydL\nRktP6k5SnTxwgGdrfeHUKvRJzHqNQee5L5bQLlXZy2E2e5xFjQ64PXRKOfCD\nk8BgQAUcU2XTNjpdn8j3mD6n6h4b6YsmOvjxVV+4bShiCU4tfGV7aKtBUMJ7\nNukY\r\n=yJBK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDrm/t9AnLGKIJjQQbFgB+AfCgB9f3tT08NiaTVlGs7YQIhAJeQMuZcNYq+bZ2T4upfMIJjZJ/inoPlzC0pccxXT8QI"}],"size":1547,"noattachment":false,"key":"/url-or-path/-/url-or-path-0.0.0.tgz"},"_npmUser":{"name":"fisker","email":"lionkay@gmail.com"},"directories":{},"maintainers":[{"name":"fisker","email":"lionkay@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/url-or-path_0.0.0_1629862067282_0.17380618965050232"},"_hasShrinkwrap":false,"readme":"# url-or-path\n\n[![Build Status][github_actions_badge]][github_actions_link]\n[![Coverage][coveralls_badge]][coveralls_link]\n[![Npm Version][package_version_badge]][package_link]\n[![MIT License][license_badge]][license_link]\n\n[github_actions_badge]: https://img.shields.io/github/actions/workflow/status/fisker/url-or-path/continuous-integration.yml?barnach=main&style=flat-square\n[github_actions_link]: https://github.com/fisker/url-or-path/actions?query=branch%3Amain\n[coveralls_badge]: https://img.shields.io/coveralls/github/fisker/url-or-path/main?style=flat-square\n[coveralls_link]: https://coveralls.io/github/fisker/url-or-path?branch=main\n[license_badge]: https://img.shields.io/npm/l/prettier-format.svg?style=flat-square\n[license_link]: https://github.com/fisker/url-or-path/blob/main/license\n[package_version_badge]: https://img.shields.io/npm/v/url-or-path.svg?style=flat-square\n[package_link]: https://www.npmjs.com/package/url-or-path\n\n> Convert between file URL and path.\n\n## Install\n\n```bash\nyarn add url-or-path\n```\n\n## Usage\n\n```js\nimport {toUrl, toPath} from 'url-or-path'\n\nconsole.log(toUrl(urlOrPath))\n//=> URL {/* ... */}\n\nconsole.log(toPath(urlOrPath))\n//=> 'path/to/file'\n```\n\n## API\n\n### `toUrl(urlOrPath)`(alias `toURL`)\n\nType: `string | URL`\n\nReturns a [`URL`](https://nodejs.org/dist/latest-v16.x/docs/api/url.html#url_class_url) object of given URL or path string.\n\n### `toPath(urlOrPath)`\n\nType: `string | URL`\n\nReturns path string of given URL or path string.\n\n### `toDirectory(urlOrPath)`\n\nType: `string | URL`\n\nSame as `toUrl`, but the result URL always ends with `/`.\n\n### `isUrl(value)`(alias `isURL`)\n\nCheck if `value` is a `URL` instance or a string starts with `file://`.\n\n### `isUrlInstance(value)`(alias `isURLInstance`)\n\nCheck if `value` is a `URL` instance.\n\n### `isUrlString(value)`(alias `isURLString`)\n\nCheck if `value` is a string starts with `file://`.\n","publish_time":1629862067391,"_cnpm_publish_time":1629862067391,"dist-tags":{"latest":"2.7.1"}}