{"_id":"@wrote/read","_rev":"300175","name":"@wrote/read","description":"Read the contents of file from the filesystem.","dist-tags":{"latest":"1.0.4"},"maintainers":[{"name":"zvr","email":""}],"time":{"modified":"2024-01-31T16:07:04.000Z","created":"2018-09-26T11:41:50.729Z","1.0.4":"2019-04-10T14:35:24.001Z","1.0.3":"2019-04-02T18:08:16.545Z","1.0.2":"2019-01-14T22:23:46.966Z","1.0.1":"2019-01-14T13:42:15.418Z","1.0.0":"2018-09-26T11:41:50.729Z"},"users":{},"author":{"name":"Anton","email":"anton@adc.sh"},"repository":{"type":"git","url":"git://github.com/wrote/read.git"},"versions":{"1.0.4":{"name":"@wrote/read","version":"1.0.4","description":"Read the contents of file from the filesystem.","main":"build/index.js","module":"src/index.js","scripts":{"t":"zoroaster -a","test":"yarn t test/spec","test-build":"ALAMODE_ENV=test-build yarn test","test-all":"yarn-s test test-build","test-watch":"yarn test -w","lint":"eslint .","doc":"NODE_DEBUG=doc doc documentary -o README.md","b":"alamode src -o build","d":"NODE_DEBUG=doc doc src/index.js -g","build":"yarn-s d b doc","rec":"NODE_DEBUG=appshot appshot -T 23 -a Terminal -y 150 -f","e":"alanode","example/":"yarn e example/example.js"},"repository":{"type":"git","url":"git://github.com/wrote/read.git"},"keywords":["read","wrote","filesystem","fs","buffer","string","access","data","file"],"author":{"name":"Anton","email":"anton@adc.sh"},"license":"MIT","bugs":{"url":"https://github.com/wrote/read/issues"},"homepage":"https://github.com/wrote/read#readme","devDependencies":{"alamode":"^1.9.2","documentary":"^1.23.4","eslint-config-artdeco":"1.0.1","temp-context":"^2.1.3","yarn-s":"1.1.0","zoroaster":"^3.11.4"},"dependencies":{"catchment":"^3.3.0"},"licenseText":"MIT License\n\nCopyright (c) 2018 Art Deco Code Limited\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@wrote/read@1.0.4","dist":{"shasum":"b7343b3bbfb1d1b9ed35ee87e8021730f13f5fcf","size":3139,"noattachment":false,"key":"/@wrote/read/-/@wrote/read-1.0.4.tgz","tarball":"http://name.csiicloud.com:7001/@wrote/read/download/@wrote/read-1.0.4.tgz"},"maintainers":[{"name":"zvr","email":""}],"_npmUser":{"name":"zvr","email":"anton@adc.sh"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/read_1.0.4_1554906923848_0.12907197258721137"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-19T19:18:41.650Z","publish_time":1554906924001,"_cnpm_publish_time":1554906924001},"1.0.3":{"name":"@wrote/read","version":"1.0.3","description":"Read a file.","main":"build/index.js","module":"src/index.js","scripts":{"t":"zoroaster -a","test":"yarn t test/spec","test-build":"ALAMODE_ENV=test-build yarn test","test-all":"yarn-s test test-build","test-watch":"yarn test -w","lint":"eslint .","doc":"NODE_DEBUG=doc doc documentary -o README.md","b":"alamode src -o build","d":"NODE_DEBUG=doc doc src/index.js -g","build":"yarn-s d b doc","rec":"NODE_DEBUG=appshot appshot -T 23 -a Terminal -y 150 -f","e":"alanode","example/":"yarn e example/example.js"},"repository":{"type":"git","url":"git://github.com/wrote/read.git"},"keywords":["read","wrote","filesystem","fs","buffer","string","access","data"],"author":{"name":"Anton","email":"anton@adc.sh"},"license":"MIT","bugs":{"url":"https://github.com/wrote/read/issues"},"homepage":"https://github.com/wrote/read#readme","devDependencies":{"alamode":"1.9.0","documentary":"1.23.2","eslint-config-artdeco":"1.0.1","temp-context":"2.1.2","yarn-s":"1.1.0","zoroaster":"3.11.2"},"dependencies":{"catchment":"3.2.3"},"licenseText":"MIT License\n\nCopyright (c) 2018 Art Deco Code Limited\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@wrote/read@1.0.3","dist":{"shasum":"6d47d2e9c545bee74be2d0155d6c726984ad8b53","size":3091,"noattachment":false,"key":"/@wrote/read/-/@wrote/read-1.0.3.tgz","tarball":"http://name.csiicloud.com:7001/@wrote/read/download/@wrote/read-1.0.3.tgz"},"maintainers":[{"name":"zvr","email":""}],"_npmUser":{"name":"zvr","email":"anton@adc.sh"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/read_1.0.3_1554228496387_0.8856851718426157"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-19T19:18:39.789Z","publish_time":1554228496545,"_cnpm_publish_time":1554228496545},"1.0.2":{"name":"@wrote/read","version":"1.0.2","description":"Read a file.","main":"build","module":"src/index.js","scripts":{"t":"zoroaster -a","test":"yarn t test/spec","test-build":"ALAMODE_ENV=test-build yarn test","test-all":"yarn-s test test-build","test-watch":"yarn test -w","lint":"eslint .","doc":"NODE_DEBUG=doc doc documentary -o README.md","b":"alamode src -o build","d":"NODE_DEBUG=doc doc src/index.js -g","build":"yarn-s d b doc","rec":"NODE_DEBUG=appshot appshot -T 23 -a Terminal -y 150 -f","e":"node example","example/":"yarn e example/example.js"},"repository":{"type":"git","url":"git://github.com/wrote/read.git"},"keywords":["read","wrote","filesystem","fs","buffer","string","access","data"],"author":{"name":"Anton","email":"anton@adc.sh"},"license":"MIT","bugs":{"url":"https://github.com/wrote/read/issues"},"homepage":"https://github.com/wrote/read#readme","devDependencies":{"alamode":"1.6.1","documentary":"1.20.1","eslint-config-artdeco":"1.0.1","temp-context":"2.1.0","yarn-s":"1.1.0","zoroaster":"3.6.6"},"dependencies":{"catchment":"3.2.1"},"licenseText":"MIT License\n\nCopyright (c) 2018 Art Deco Code Limited\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@wrote/read@1.0.2","dist":{"shasum":"6d1d2b2f3e2e1830007384b06c31fb58ec77cf21","size":2834,"noattachment":false,"key":"/@wrote/read/-/@wrote/read-1.0.2.tgz","tarball":"http://name.csiicloud.com:7001/@wrote/read/download/@wrote/read-1.0.2.tgz"},"maintainers":[{"name":"zvr","email":""}],"_npmUser":{"name":"zvr","email":"anton@adc.sh"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/read_1.0.2_1547504626762_0.48553178395282504"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-19T19:18:38.133Z","publish_time":1547504626966,"_cnpm_publish_time":1547504626966},"1.0.1":{"name":"@wrote/read","version":"1.0.1","description":"Read a file.","main":"build","module":"src/index.js","scripts":{"t":"zoroaster -a","test":"yarn t test/spec","test-build":"ALAMODE_ENV=test-build yarn test","test-all":"yarn-s test test-build","test-watch":"yarn test -w","lint":"eslint .","doc":"NODE_DEBUG=doc doc documentary -o README.md","b":"alamode src -o build","d":"NODE_DEBUG=doc doc src/index.js -g","build":"yarn-s d b doc","rec":"NODE_DEBUG=appshot appshot -T 23 -a Terminal -y 150 -f","e":"node example","example/":"yarn e example/example.js"},"repository":{"type":"git","url":"git://github.com/wrote/read.git"},"keywords":["read","wrote","filesystem","fs","buffer","string","access","data"],"author":{"name":"Anton","email":"anton@adc.sh"},"license":"MIT","bugs":{"url":"https://github.com/wrote/read/issues"},"homepage":"https://github.com/wrote/read#readme","devDependencies":{"alamode":"1.5.1","documentary":"1.20.1","eslint-config-artdeco":"1.0.1","temp-context":"1.1.0","yarn-s":"1.1.0","zoroaster":"3.5.1"},"dependencies":{"catchment":"3.1.1"},"licenseText":"MIT License\n\nCopyright (c) 2018 Art Deco Code Limited\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@wrote/read@1.0.1","dist":{"shasum":"c407247df93e43a24914d65a6ad3ecc1ab0da9e6","size":2803,"noattachment":false,"key":"/@wrote/read/-/@wrote/read-1.0.1.tgz","tarball":"http://name.csiicloud.com:7001/@wrote/read/download/@wrote/read-1.0.1.tgz"},"maintainers":[{"name":"zvr","email":""}],"_npmUser":{"name":"zvr","email":"anton@adc.sh"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/read_1.0.1_1547473335304_0.5907425340123309"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-19T19:18:36.498Z","publish_time":1547473335418,"_cnpm_publish_time":1547473335418},"1.0.0":{"name":"@wrote/read","version":"1.0.0","description":"Read a file.","main":"build","scripts":{"t":"zoroaster -a","test":"yarn t test/spec","test-build":"ALAMODE_ENV=test-build yarn test","test-all":"yarn-s test test-build","test-watch":"yarn test -w","lint":"eslint .","doc":"NODE_DEBUG=doc doc documentary -o README.md","b":"alamode src -o build","d":"NODE_DEBUG=doc doc src/index.js -g","build":"yarn-s d b doc","rec":"NODE_DEBUG=appshot appshot -T 23 -a Terminal -y 150 -f","e":"node example","example/":"yarn e example/example.js"},"repository":{"type":"git","url":"git://github.com/wrote/read.git"},"keywords":["read","wrote","filesystem","fs","buffer","string","access","data"],"author":{"name":"Anton","email":"anton@adc.sh"},"license":"MIT","bugs":{"url":"https://github.com/wrote/read/issues"},"homepage":"https://github.com/wrote/read#readme","devDependencies":{"alamode":"1.5.1","documentary":"1.20.1","eslint-config-artdeco":"1.0.1","temp-context":"1.1.0","yarn-s":"1.1.0","zoroaster":"3.5.1"},"dependencies":{"catchment":"3.1.1"},"licenseText":"MIT License\n\nCopyright (c) 2018 Art Deco Code Limited\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@wrote/read@1.0.0","dist":{"shasum":"ab57de1def7af1ec0b63853b63147ed641ba0db0","size":2669,"noattachment":false,"key":"/@wrote/read/-/@wrote/read-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/@wrote/read/download/@wrote/read-1.0.0.tgz"},"maintainers":[{"name":"zvr","email":""}],"_npmUser":{"name":"zvr","email":"anton@adc.sh"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/read_1.0.0_1537962110563_0.800470527439735"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-19T19:18:34.838Z","publish_time":1537962110729,"_cnpm_publish_time":1537962110729}},"readme":"# @wrote/read\n\n[![npm version](https://badge.fury.io/js/%40wrote%2Fread.svg)](https://npmjs.org/package/@wrote/read)\n\n`@wrote/read` is a package to read a file as a string or a Buffer.\n\n```sh\nyarn add -E @wrote/read\n```\n\n## Table Of Contents\n\n- [Table Of Contents](#table-of-contents)\n- [API](#api)\n- [`async read(path: string): string`](#async-readpath-string-string)\n- [`async readBuffer(path: string): Buffer`](#async-readbufferpath-string-buffer)\n- [Copyright](#copyright)\n\n<p align=\"center\"><a href=\"#table-of-contents\"><img src=\".documentary/section-breaks/0.svg?sanitize=true\"></a></p>\n\n## API\n\nThe package is available by importing its default function `read`, and named function `readBuffer`:\n\n```js\nimport read, { readBuffer } from '@wrote/read'\n```\n\n<p align=\"center\"><a href=\"#table-of-contents\"><img src=\".documentary/section-breaks/1.svg?sanitize=true\"></a></p>\n\n## `async read(`<br/>&nbsp;&nbsp;`path: string,`<br/>`): string`\n\nRead the file as a string.\n\n```js\n/* yarn example/ */\nimport read from '@wrote/read'\n\n(async () => {\n  const res = await read('example/data.txt')\n  console.log(res)\n})()\n```\n```\nHello World\n```\n\n<p align=\"center\"><a href=\"#table-of-contents\"><img src=\".documentary/section-breaks/2.svg?sanitize=true\"></a></p>\n\n## `async readBuffer(`<br/>&nbsp;&nbsp;`path: string,`<br/>`): Buffer`\n\nRead the file as a Buffer.\n\n```js\n/* yarn example/ */\nimport { readBuffer } from '@wrote/read'\n\n(async () => {\n  const res = await readBuffer('example/data.txt')\n  console.log(res)\n})()\n```\n```\n<Buffer 48 65 6c 6c 6f 20 57 6f 72 6c 64>\n```\n\n<p align=\"center\"><a href=\"#table-of-contents\"><img src=\".documentary/section-breaks/3.svg?sanitize=true\"></a></p>\n\n## Copyright\n\n<table>\n  <tr>\n    <th>\n      <a href=\"https://artd.eco\">\n        <img src=\"https://raw.githubusercontent.com/wrote/wrote/master/images/artdeco.png\" alt=\"Art Deco\" />\n      </a>\n    </th>\n    <th>© <a href=\"https://artd.eco\">Art Deco</a> for <a href=\"https://wrote.cc\">Wrote</a> 2019</th>\n    <th>\n      <a href=\"https://wrote.cc\">\n        <img src=\"https://avatars3.githubusercontent.com/u/40831417?s=100\" width=\"100\" alt=\"Wrote\" />\n      </a>\n    </th>\n    <th>\n      <a href=\"https://www.technation.sucks\" title=\"Tech Nation Visa\">\n        <img src=\"https://raw.githubusercontent.com/artdecoweb/www.technation.sucks/master/anim.gif\"\n          alt=\"Tech Nation Visa\" />\n      </a>\n    </th>\n    <th><a href=\"https://www.technation.sucks\">Tech Nation Visa Sucks</a></th>\n  </tr>\n</table>\n\n<p align=\"center\"><a href=\"#table-of-contents\"><img src=\".documentary/section-breaks/-1.svg?sanitize=true\"></a></p>","_attachments":{},"homepage":"https://github.com/wrote/read#readme","bugs":{"url":"https://github.com/wrote/read/issues"},"license":"MIT"}