{"_id":"@amraneze/sliding-window","_rev":"1-ff157eb145eda087889704995a831e0f","name":"@amraneze/sliding-window","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@amraneze/sliding-window","version":"1.0.0","description":"A NPM module that handle sliding window. You can use it if you have a certain time before processing a certain data","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"build":"tsc","lint":"tslint -p tsconfig.json","test":"jest --config jestconfig.json --coverage","prepare":"npm run build","prepublishOnly":"npm test && npm run lint","preversion":"npm run lint","version":"npm run format && git add -A .","postversion":"git push && git push --tags","format":"prettier --write \"**/*.ts\" \"**/*.js\"","clean":"npm cache clear --force && npm clean-install","cover:test":"nyc npm run test","cover":"npm run test && codecov"},"repository":{"type":"git","url":"git+https://github.com/Amraneze/sliding-window.git"},"bugs":{"url":"https://github.com/Amraneze/sliding-window/issues"},"homepage":"https://github.com/Amraneze/sliding-window.git","keywords":["window sliding","window","sliding"],"categories":["Other"],"author":{"name":"Amrane Ait Zeouay"},"license":"ISC","devDependencies":{"@types/jest":"^25.2.1","codecov":"^3.6.5","jest":"^25.3.0","prettier":"^2.0.4","ts-jest":"^25.4.0","tslint":"^6.1.1","tslint-config-prettier":"^1.18.0","typescript":"^3.8.3"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true},"gitHead":"1dc99f319694ea90dd98d5c2d6b53295e4318914","_id":"@amraneze/sliding-window@1.0.0","_nodeVersion":"12.16.2","_npmVersion":"6.14.4","dist":{"integrity":"sha512-iFUUDHh/anrZK/4n/JDUdO8HvvrmqnQhj2OZc46imZOJ3Ta0I1MgWUCd671h1DutDtLWIgXT/BIhPIZxWB+p2w==","shasum":"7ccc267413a64b0d8226c95f7ef71b7b6bdc3de7","tarball":"https://registry.npmjs.org/@amraneze/sliding-window/-/sliding-window-1.0.0.tgz","fileCount":6,"unpackedSize":6234,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJemfDvCRA9TVsSAnZWagAAnxAP/1Rd137dCreD+H5wnebq\nvCBVIxKEMu7wMsPj+FLqoVpyfjecnL+uue0BXI7ZgrdIWpgZTCRTW4btchaV\ns9j3I8p66iHvklivg1INzoWQymZ66QlN8Edl++TxmjYQLzDCUTP9UZbXtq74\nZ9YeK2XrhrBQ0l3+qozALpcwxBUvWrXBbYP+1ygi8AG/K8YNiCHrh90byv9u\neDKxJmTyX1ooVnRY5j26Ep8w5VHLthZtA1eqcMX6vHru2s2dV2kkgd2to20Q\npgBoH7c9NlUeYfhUXI1aRMbmPIGyotTo7rtO0EfnZN67uiBFIARTZUGm6vFb\niRf8oHT1Fownl7MX6S1zC7QTkqtUSuXwJWZ/rgU096xWafw/zOtyeolONan5\nDC6z8REQGtoLIbMo9a3XtWcrjWsu5exG5W8sRBTF8tVSh/a9j5SriRqgSAQn\nuzYOeQFsDTGrY/cinJpWjGH7P6Hg2p6Lb9lnLxLL+djxpHXwfN0k/KsA7kVP\nKZoe3gxwEbn09enNFWNep+R9BIEg+30FcPz+T2BgYb1uDQ9nj8tcjvXidL/I\nOr1xece+4f/7JbsQWTRoXXDEBergxoOLeeQl8i4WhWkWA0OHSv0IZLFcjmNp\nZ6c02H8gPJR9rjwFrrL/Kkydq6qoUCakvNYYlzuukals4WVHAoyD+kIyl2jb\nyW9n\r\n=+8hi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDaiIOU2upV8911Ohe0O0t+H+yknq/dFDxK3eO2M57jSgIgIIws0jcs9ZH4XssNIbPBMJMvtjtGPO38gpXzf5zKo1c="}]},"maintainers":[{"name":"amraneze","email":"a.zeouayamran@gmail.com"}],"_npmUser":{"name":"amraneze","email":"a.zeouayamran@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sliding-window_1.0.0_1587146991035_0.008228338585848594"},"_hasShrinkwrap":false}},"time":{"created":"2020-04-17T18:09:50.988Z","1.0.0":"2020-04-17T18:09:51.172Z","modified":"2022-04-04T13:52:58.958Z"},"maintainers":[{"name":"amraneze","email":"a.zeouayamran@gmail.com"}],"description":"A NPM module that handle sliding window. You can use it if you have a certain time before processing a certain data","homepage":"https://github.com/Amraneze/sliding-window.git","keywords":["window sliding","window","sliding"],"repository":{"type":"git","url":"git+https://github.com/Amraneze/sliding-window.git"},"author":{"name":"Amrane Ait Zeouay"},"bugs":{"url":"https://github.com/Amraneze/sliding-window/issues"},"license":"ISC","readme":"# Sliding Window Module\r\n\r\n[![GitHub Release](https://img.shields.io/github/package-json/v/amraneze/sliding-window/master?style=flat-square)]()  \r\n[![GitHub Issues](https://img.shields.io/github/issues/amraneze/sliding-window?style=flat-square)]()\r\n[![codecov](https://codecov.io/gh/Amraneze/sliding-window/branch/master/graph/badge.svg)](https://codecov.io/gh/Amraneze/sliding-window)\r\n\r\nSliding Window is an npm module which does not process data while the queue is full.\r\n\r\n> NOTE: For each 500 ms the module is checking if the duration of each element of the queue exceeded the time limit (which is the window slide).\r\n\r\n## Installation\r\n\r\n### With NPM\r\n\r\n```bash\r\n$ npm install sliding-window\r\n```\r\n\r\n### With Yarn\r\n\r\n```bash\r\n$ yarn add sliding-window\r\n```\r\n\r\n## Usage\r\n\r\nYou should import the module after installing it with npm/yarn\r\n\r\n```node\r\nimport WindowSliding from 'sliding-window';\r\n\r\nconst windowSliding = new WindowSliding(60 * 1000, 10);\r\n```\r\n\r\nThere are two paramaters in the constructor, the first one to define the time limit in seconds and the second for the maximum data that can be processed within the time limit.\r\n\r\n## Building\r\n\r\nYou can pull the project and run the following command to install the dependencies of the project:\r\n\r\n### With NPM\r\n\r\n```bash\r\n$ npm install\r\n```\r\n\r\n### With Yarn\r\n\r\n```bash\r\n$ yarn install\r\n```\r\n\r\nthen this command to build it:\r\n\r\n### With NPM\r\n\r\n```bash\r\n$ npm run build\r\n```\r\n\r\n### With Yarn\r\n\r\n```bash\r\n$ yarn run build\r\n```\r\n\r\n## Testing\r\n\r\n### With NPM\r\n\r\n```bash\r\n$ npm run test\r\n```\r\n\r\n### With Yarn\r\n\r\n```bash\r\n$ yarn run test\r\n```\r\n\r\n## Contributions\r\n\r\nContributions are always welcome via pull requests.\r\n","readmeFilename":"README.md"}