{"_id":"qansigliere-parse-link-from-headers","_rev":"1-4277ed90d1b8a30bfbd8a80471e8ea78","name":"qansigliere-parse-link-from-headers","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.2":{"name":"qansigliere-parse-link-from-headers","version":"0.0.2","keywords":["github","gitlab","api","headers","response","next","link","key","qansigliere"],"author":{"name":"qansigliere@gmail.com"},"license":"MIT","_id":"qansigliere-parse-link-from-headers@0.0.2","maintainers":[{"name":"qansigliere","email":"qansigliere@gmail.com"}],"homepage":"https://github.com/QANSIGLIERE/parse-link-from-headers#readme","bugs":{"url":"https://github.com/QANSIGLIERE/parse-link-from-headers/issues"},"dist":{"shasum":"66b325207f765a1bb563741e64664527a3d4faa7","tarball":"https://registry.npmjs.org/qansigliere-parse-link-from-headers/-/qansigliere-parse-link-from-headers-0.0.2.tgz","fileCount":16,"integrity":"sha512-MilcD0cGfPORLySgOgxtaHz9gMXjDtaGt9Ldh6cRJwHLtqjcaIGxtlfVjbEzRRWccvMltF8CFxBjUc2HYurnkw==","signatures":[{"sig":"MEQCIFKqaz+xsrikh1hzG3KF7Zv2wuAArFgy6LofSe75NmG8AiBCjRZrKCytdQLNyhU49x82r+LKSOF7X0zOiNABymLGwQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14016},"main":"index.js","types":"./index.d.ts","gitHead":"18ec9c25436f7240631c18c2a9df42b788eb7537","scripts":{"test":"jest"},"_npmUser":{"name":"qansigliere","email":"qansigliere@gmail.com"},"repository":{"url":"git+https://github.com/QANSIGLIERE/parse-link-from-headers.git","type":"git"},"_npmVersion":"10.9.0","description":"The main idea of ​​this library created in the JavaScript language is to parse data from server response headers and define next link for upload. It can be used for Github and Gitlab API integrations","directories":{},"_nodeVersion":"22.11.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","typescript":"^5.7.3"},"_npmOperationalInternal":{"tmp":"tmp/qansigliere-parse-link-from-headers_0.0.2_1739718897786_0.5057303406403921","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"qansigliere-parse-link-from-headers","version":"0.0.3","description":"The main idea of ​​this library created in the JavaScript language is to parse data from server response headers and define next link for upload. It can be used for Github and Gitlab API integrations","main":"index.js","scripts":{"test":"jest"},"repository":{"type":"git","url":"git+https://github.com/QANSIGLIERE/parse-link-from-headers.git"},"keywords":["github","gitlab","api","headers","response","next","link","key","qansigliere"],"author":{"name":"qansigliere@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/QANSIGLIERE/parse-link-from-headers/issues"},"homepage":"https://github.com/QANSIGLIERE/parse-link-from-headers#readme","devDependencies":{"jest":"^29.7.0","typescript":"^5.7.3"},"_id":"qansigliere-parse-link-from-headers@0.0.3","gitHead":"bf0814549bde4b64f3be2fad4b608ef84087d150","types":"./index.d.ts","_nodeVersion":"22.11.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-JpzAIJbUh8FyBxqy4rIxMPU+PBIik46R/3ldv1wJwp9yl6TVOnM7CCtfwww6b6WYP0brxE//WHN2HAs4DAgI+g==","shasum":"ec825d6b463e8b45d8c18a4767a6475a26f82720","tarball":"https://registry.npmjs.org/qansigliere-parse-link-from-headers/-/qansigliere-parse-link-from-headers-0.0.3.tgz","fileCount":16,"unpackedSize":16102,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDqTcLXFcCMt+7/IT0FN8oufznx4tHOmGF/kyk9JGlGIgIgV9cjCLOyGwD2Ajihegzht7RNNjI1tlMhpCj/oPld3Xk="}]},"_npmUser":{"name":"qansigliere","email":"qansigliere@gmail.com"},"directories":{},"maintainers":[{"name":"qansigliere","email":"qansigliere@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/qansigliere-parse-link-from-headers_0.0.3_1739720572225_0.0638567641866663"},"_hasShrinkwrap":false}},"time":{"created":"2025-02-16T15:14:57.785Z","modified":"2025-02-16T15:42:52.611Z","0.0.2":"2025-02-16T15:14:57.983Z","0.0.3":"2025-02-16T15:42:52.439Z"},"bugs":{"url":"https://github.com/QANSIGLIERE/parse-link-from-headers/issues"},"author":{"name":"qansigliere@gmail.com"},"license":"MIT","homepage":"https://github.com/QANSIGLIERE/parse-link-from-headers#readme","keywords":["github","gitlab","api","headers","response","next","link","key","qansigliere"],"repository":{"type":"git","url":"git+https://github.com/QANSIGLIERE/parse-link-from-headers.git"},"description":"The main idea of ​​this library created in the JavaScript language is to parse data from server response headers and define next link for upload. It can be used for Github and Gitlab API integrations","maintainers":[{"name":"qansigliere","email":"qansigliere@gmail.com"}],"readme":"# Parse link key from headers response in GITHUB and GITLAB\n\nThe main idea of ​​this library created in the JavaScript language is to parse data from server response headers and\ndefine next link for upload. It can be used for Github and Gitlab API integrations\n\n## Author\n\nhttps://www.youtube.com/@QANSIGLIERE/\n\n## Support the project\n\nhttps://buymeacoffee.com/qansigliere\n\n## Installation\n\nUsing npm `npm i qansigliere-parse-link-from-headers`\n\n## How to use it\n\nIn case if You work with Github and/or Gitlab API, You need to convert link key value from response headers to upload\nall available data. This library can help You with it. How it works:\n\n```\nvar { linkParser } = require('qansigliere-parse-link-from-headers');\n\nlet headers = {\n        date: 'Fri, 14 Feb 2025 14:40:38 GMT',\n        'content-type': 'application/json; charset=utf-8',\n        'cache-control': 'private, max-age=60, s-maxage=60',\n        vary: 'Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With',\n        etag: 'W/\"444f830838f7afe42d388ad25ee6b7bd900ea021e8f94efed012f1445e29dc80\"',\n        'github-authentication-token-expiration': '2025-03-16 17:35:17 +0300',\n        'x-github-media-type': 'github.v3; format=json',\n        link: '<https://api.github.com/repositories/929484816/pulls?state=all&per_page=1&page=2 >; rel=\"next\", <https://api.github.com/repositories/929484816/pulls?state=all&per_page=1&page=2 >; rel=\"last\"',\n        'x-accepted-github-permissions': 'pull_requests=read',\n        'x-github-api-version-selected': '2022-11-28',\n        'x-ratelimit-limit': '5000',\n        'x-ratelimit-remaining': '4995',\n        'x-ratelimit-reset': '1739547333',\n        'x-ratelimit-used': '5',\n        'x-ratelimit-resource': 'core',\n        'access-control-expose-headers':\n            'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset',\n        'access-control-allow-origin': '*',\n        'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',\n        'x-frame-options': 'deny',\n        'x-content-type-options': 'nosniff',\n        'x-xss-protection': '0',\n        'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',\n        'content-security-policy': \"default-src 'none'\",\n        'transfer-encoding': 'chunked',\n        server: 'GitHub · Build and ship software on a single, collaborative platform ',\n        'x-github-request-id': '8408:AF9A4:1713322:17A6E88:67AF55E6',\n    };\n\n    console.log(linkParser(headers));\n```\n\nYou will get such simple response:\n\n```\n{\n    next: 'https://api.github.com/repositories/929484816/pulls?state=all&per_page=1&page=2',\n    last: 'https://api.github.com/repositories/929484816/pulls?state=all&per_page=1&page=2',\n}\n```\n\n## Improvements & Suggestions\n\nhttps://forms.gle/GZbS9hw42tSYJxKL7\n\n## Related Videos\n\n-   https://www.youtube.com/live/uaoDKVlRY04?si=87D_8yLpH0NoLFd4\n","readmeFilename":"README.md"}