{"_id":"@destinationstransfers/ntp","_rev":"4-20e7cce5c673ee2f842134a421641951","name":"@destinationstransfers/ntp","description":"Lightweight Node implementation of the NTP Client Protocol","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.2":{"name":"@destinationstransfers/ntp","version":"1.0.2","author":{"name":"Tino Vyatkin","email":"tino@vtkn.io"},"devDependencies":{"@destinationstransfers/eslint-config":"^1.0.2","eslint":"^4.9.0","eslint-plugin-import":"^2.7.0","eslint-plugin-node":"^5.2.0","jest":"^21.2.1","remark-cli":"^4.0.0","remark-preset-lint-consistent":"^2.0.1","remark-preset-lint-recommended":"^3.0.1"},"engines":{"node":">=8"},"description":"Lightweight Node implementation of the NTP Client Protocol","files":["index.js"],"license":"MIT","main":"index.js","repository":{"type":"git","url":"git+https://github.com/destinationstransfers/ntp.git"},"homepage":"https://github.com/destinationstransfers/ntp#readme","bugs":{"url":"https://github.com/destinationstransfers/ntp/issues"},"scripts":{"test":"jest"},"remarkConfig":{"presets":["lint-recommended","lint-consistent"]},"jest":{"collectCoverage":true,"testEnvironment":"node","verbose":true,"bail":true},"eslintConfig":{"plugins":["node"],"extends":["@destinationstransfers","plugin:node/recommended"],"env":{"node":true},"parserOptions":{"sourceType":"script"}},"gitHead":"6ed1340079c8014f3c7f35ab4c99e6d2caecd8eb","_id":"@destinationstransfers/ntp@1.0.2","_npmVersion":"5.5.1","_nodeVersion":"9.2.0","_npmUser":{"name":"tinovyatkin","email":"tino@vtkn.io"},"dist":{"integrity":"sha512-v8yfPiIT/YF9mdVHRT7T7b1fxj0y+llWhriq0+4W0fN/iDbBGEiMnpThkd87eAQQutI9LnOqK2jk3Dlt1U+Nrg==","shasum":"6ce91896989e17399bf79f220773a26e14d301a5","tarball":"https://registry.npmjs.org/@destinationstransfers/ntp/-/ntp-1.0.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICor4RDESFk6RyID6sQ/qqF1hxZQo8UxQimxMgz6IHQoAiEAqhemzvrKX/nGdJHaS0OLtB5Wq4vcitaoWx3F754jVWg="}]},"maintainers":[{"name":"tinovyatkin","email":"tino@vtkn.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ntp-1.0.2.tgz_1510811365399_0.7067455877549946"},"directories":{}},"1.1.0":{"name":"@destinationstransfers/ntp","version":"1.1.0","author":{"name":"Tino Vyatkin","email":"tino@vtkn.io"},"devDependencies":{"@destinationstransfers/eslint-config":"^1.0.2","eslint":"^4.9.0","eslint-plugin-import":"^2.7.0","eslint-plugin-node":"^5.2.0","jest":"^21.2.1","remark-cli":"^4.0.0","remark-preset-lint-consistent":"^2.0.1","remark-preset-lint-recommended":"^3.0.1"},"engines":{"node":">=8"},"description":"Lightweight Node implementation of the NTP Client Protocol","files":["index.js"],"license":"MIT","main":"index.js","repository":{"type":"git","url":"git+https://github.com/destinationstransfers/ntp.git"},"homepage":"https://github.com/destinationstransfers/ntp#readme","bugs":{"url":"https://github.com/destinationstransfers/ntp/issues"},"scripts":{"test":"jest"},"remarkConfig":{"presets":["lint-recommended","lint-consistent"]},"jest":{"collectCoverage":true,"testEnvironment":"node","verbose":true,"bail":true},"eslintConfig":{"plugins":["node"],"extends":["@destinationstransfers","plugin:node/recommended"],"env":{"node":true},"parserOptions":{"sourceType":"script"}},"gitHead":"ec138136362ed1eeec7f0994bb120c14f36f65e9","_id":"@destinationstransfers/ntp@1.1.0","_npmVersion":"5.5.1","_nodeVersion":"9.2.0","_npmUser":{"name":"tinovyatkin","email":"tino@vtkn.io"},"dist":{"integrity":"sha512-F/VputyOTA4FOTXI6i9woW0IyUXVroqomTSp+/0QQhFM5arAFT+UZ6PuNAexya35UnA1sV8Zk2SOCKBHFnjP6g==","shasum":"ac8babdd7c689dba7ac933b4f74222b841add32d","tarball":"https://registry.npmjs.org/@destinationstransfers/ntp/-/ntp-1.1.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDNwY2dCnxXA2NDSGa29r1JwIaEz5cGAvtyhA0JKcfzGwIhAIbc91N9F+bImogbzZFfG/mPEOpd8gkFZ7nFUcuF8N86"}]},"maintainers":[{"name":"tinovyatkin","email":"tino@vtkn.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ntp-1.1.0.tgz_1510864664936_0.21004949160851538"},"directories":{}},"1.2.0":{"name":"@destinationstransfers/ntp","version":"1.2.0","author":{"name":"Tino Vyatkin","email":"tino@vtkn.io"},"devDependencies":{"@destinationstransfers/eslint-config":"latest","eslint":"latest","jest":"latest"},"engines":{"node":">=8"},"description":"Lightweight Node implementation of the NTP Client Protocol","license":"MIT","main":"index.js","repository":{"type":"git","url":"git+https://github.com/destinationstransfers/ntp.git"},"homepage":"https://github.com/destinationstransfers/ntp#readme","bugs":{"url":"https://github.com/destinationstransfers/ntp/issues"},"scripts":{"test":"jest"},"jest":{"collectCoverage":true,"testEnvironment":"node","verbose":true,"bail":true},"eslintConfig":{"plugins":["node"],"extends":["@destinationstransfers"],"env":{"node":true},"parserOptions":{"sourceType":"script"}},"gitHead":"d0139128b0057f4810266c84d5b90dd74cdf9e11","_id":"@destinationstransfers/ntp@1.2.0","_npmVersion":"6.4.1","_nodeVersion":"11.5.0","_npmUser":{"name":"tinovyatkin","email":"tino@vtkn.io"},"dist":{"integrity":"sha512-JUfz6e/KjLjCmJ0oTWLhtX+T9sSZctjGbcWh7EyFNusD3RXJGqz8uxE7UZCpERxLyl3u7WtRGWaEgW7x10RXvg==","shasum":"282c884ca0a0010465a5c63f53b497c02f1dec40","tarball":"https://registry.npmjs.org/@destinationstransfers/ntp/-/ntp-1.2.0.tgz","fileCount":5,"unpackedSize":6792,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcI7VCCRA9TVsSAnZWagAAatEQAKL0ZcXboaOY7Vs1DLbq\npwv1NG0baz2y7EiMttz34Qny1N1aeUoo9FSRQwOs5L9BwfAvd+VuSSTM+h8b\nT479HqQ/RVLj55KNtNQlLunlvPBqqMek2+09vw4xRbzfqpJeZyAPJB5UQyxR\nMnAFfyrbceDr+cgdKtDAwXZoDaZEbqPe2OkJk1KyPv9qtizhQg+94ojEZ3Vf\nP9oizc3dhr+pFu38GjkhzlF71rV7PL9tm/5RB1NQUUQep7nbzRH0k58OQoti\nG6xXlv0g7E9NV6rN34PxhV7dWt9+lnUCu/vvSCzzLHEZUc9UUuOq8jV6RtDD\nnec0n2V0LSRhcJgsqOwWX42EKU1zbdGWvDtzCnPUXmG0Wv00QirdjNO/V09+\ncEUwz1rYkOzjfnxXzpwF395weEJdjVLyIjBBU0G4tRwtT0B6qG4QRiU5M0Wz\n7okg/bUiObk86TwgdZDQBTGxtw75kr4/rY0sQskS95yID3TQ8zAxN+3Z7LWt\nKYrEv0v+WUhbumqsoy0tfBJItQs+2L1vL6oogVagMCv+Ay2qQNMc2P5Qqeui\nsdJ/NXYmOsfEiEP4xOfRnFzg4IUfiAUP+QoaKsY/YHa4uJf/ZgeriZ6eVYBL\ncckiKxOOVwUZ41j4J+6tuj5pT+q8gTkeJZG3YdSKrgdfXZwR7gkxS9q5flA2\nQ5bD\r\n=9+k3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICU1Z/FDMRytMqkzV0MkxPTCVaA6Z12c7OZCoIdU4FpIAiEA3oPI5Dh8OIxWA052EuEcyW38zqdnn1JemqbNe8ZOPYw="}]},"maintainers":[{"name":"tinovyatkin","email":"tino@vtkn.io"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ntp_1.2.0_1545844033975_0.33735769649693226"},"_hasShrinkwrap":false},"2.0.0":{"name":"@destinationstransfers/ntp","version":"2.0.0","author":{"name":"Tino Vyatkin","email":"tino@vtkn.io"},"devDependencies":{"@destinationstransfers/eslint-plugin":"^2.4.1","@types/jest":"^24.0.13","@types/node":"^12.0.2","eslint":"^5.16.0","jest":"^24.8.0"},"engines":{"node":">=11.13.0"},"description":"Lightweight Node implementation of the NTP Client Protocol","license":"MIT","main":"index.js","repository":{"type":"git","url":"git+https://github.com/destinationstransfers/ntp.git"},"homepage":"https://github.com/destinationstransfers/ntp#readme","bugs":{"url":"https://github.com/destinationstransfers/ntp/issues"},"scripts":{"test":"node --expose-gc node_modules/jest/bin/jest --detectOpenHandles --notify --logHeapUsage","typecheck":"tsc --p jsconfig.json","lint":"eslint \"**/*.js\" --ignore-path .gitignore"},"jest":{"collectCoverage":true,"testEnvironment":"node","verbose":true,"bail":true,"coverageReporters":["text","json","html","cobertura"]},"eslintConfig":{"plugins":["@destinationstransfers"],"extends":["plugin:@destinationstransfers/recommended"],"env":{"node":true},"parserOptions":{"sourceType":"script"}},"gitHead":"6d969697330b761450e9b47a862d1ffdbc5c6c9a","_id":"@destinationstransfers/ntp@2.0.0","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-0gYbtXpyNlk0p+jWy+lftUkB+uJIBjNUWTB2tv7/fxl8zO3pQsaVFDLFDozbQ1wnYw/PrHDeRdYwAg2frY48Tg==","shasum":"b3efa47f99287309754356aefd28029325c859fa","tarball":"https://registry.npmjs.org/@destinationstransfers/ntp/-/ntp-2.0.0.tgz","fileCount":5,"unpackedSize":6852,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3R1yCRA9TVsSAnZWagAAvWoP/2cgiNkBR82P4p27kIVB\nzGvsrGsMMM4Jh93Vb8dBJVqo0VbvNUwXGPjnWC4q9wfH7veglTRDwh933/rc\nGkxF0Xh6cDfKdCp9pjatFpiJqzBmU6F2JUgtQqLsCEUizLngP6aX315df3dz\nXw01DNPNEiN/F0hb+97mwFFcphwRW52dtBWnDEvUczoVikZS+ISOEWoyduEM\nm2Q9ArYw3QVPlX1dv76Hu7KWlxt7buP+k/BWEI15T4Z1u6kOUSpPqCSuzWNN\nZ0QOpXIndE7JrhnMJu9oxcgaXjGVd8ihDgZThGW4jjeFE+o5C/DgrBRlzgWj\nW97/3HOs1Ia6tpmpyD4rC37j6wzhqf7vy2Wi/Wh0JK+Gopmjobt/3XZpZMFB\nxPkoJhWtsJvb++cnAwSlfU2pUmruz/fygL3OADtERJ64jilD1qCaf+J2ICb4\nWg51RrI2L3tOF8RtrCI2y0KaSbf14ttk1bih7jEMF/FsJX0DNqKPWtn6Bnjv\nZ2/I5FtCrXSkWzVaFXBELAjq37tnGoJpgOuZmVA3JZmVBRgR+I9ac54lvUst\nHkvCjbpOV6M/f5ZKEcQh62x8s44V/wt+p2TfNguEPoK/IstsKeLrOJAhdsFo\nHcIO6AMJZFjQk8/qm2pp7aty7iMuA4HVv4E6acz21jhtpYmXwu5xq4wQb9uJ\nkyaq\r\n=+RM8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCkJblZY3DcRfKv2mLcN7qTACJgQ+l0/Tjf/qtRiVRN1QIhAP5acZT2eu662n176UKbEZCYXImUeTMK4pZzMgRbmh4B"}]},"maintainers":[{"name":"tinovyatkin","email":"tino@vtkn.io"}],"_npmUser":{"name":"tinovyatkin","email":"tino@vtkn.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ntp_2.0.0_1557994865499_0.3892924030786127"},"_hasShrinkwrap":false}},"readme":"# NTP Client [![CircleCI](https://circleci.com/gh/destinationstransfers/ntp.svg?style=svg)](https://circleci.com/gh/destinationstransfers/ntp) [![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n\nLightweight (no dependencies) modern Javascript (Node 8 LTS or later) implementation of the NTP Client Protocol. Based on [node-ntp-client](https://github.com/moonpyk/node-ntp-client) and [NTPServer](https://github.com/Grassboy/NTPServer).\n\nWe use it in production at <https://transfers.do> for webhooks timestamps checking (like [Stripe](https://github.com/stripe) and so on) where VM time is not reliable enough.\n\n## Usage\n\nAdd the module to your project with `npm install @destinationstransfers/ntp`.\n\n```js\nconst NTPClient = require('@destinationstransfers/ntp)';\n\nconst date = await NTPClient.getNetworkTime();\nconsole.log(date) // 2017-09-20T15:29:09.443Z\n```\n\n## API\n\n`getNetworkTime` accepts hash of parameters, below they are with default values:\n\n```js\nconst { getNetworkTime } = require('@destinationstransfers/ntp)';\n\nconst date = await getNetworkTime({\n  timeout = 10000, // timeout in ms, default is 10sec\n  server = 'time.google.com', // ntp server address\n  port = 123, // NTP server port\n})\n```\n\nYou also can override default values using env variables `NPT_PORT`, `NTP_SERVER` and `NTP_REPLY_TIMEOUT`.\n","maintainers":[{"name":"tinovyatkin","email":"tino@vtkn.io"}],"time":{"modified":"2022-04-05T04:01:14.088Z","created":"2017-11-16T05:49:26.323Z","1.0.2":"2017-11-16T05:49:26.323Z","1.1.0":"2017-11-16T20:37:48.470Z","1.2.0":"2018-12-26T17:07:14.074Z","2.0.0":"2019-05-16T08:21:05.712Z"},"homepage":"https://github.com/destinationstransfers/ntp#readme","repository":{"type":"git","url":"git+https://github.com/destinationstransfers/ntp.git"},"author":{"name":"Tino Vyatkin","email":"tino@vtkn.io"},"bugs":{"url":"https://github.com/destinationstransfers/ntp/issues"},"license":"MIT","readmeFilename":"README.md"}