{"_id":"@ant478/fps-meter","_rev":"3-f1de69e6c0c5d4970ac7fd63d894b00e","name":"@ant478/fps-meter","description":"Simple tool for displaying page FPS. ![Preview](docs/images/preview.jpg \"Preview\")","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@ant478/fps-meter","version":"1.0.0","author":{"name":"ant478"},"license":"ISC","_id":"@ant478/fps-meter@1.0.0","homepage":"https://github.com/ant478/fps-meter#readme","bugs":{"url":"https://github.com/ant478/fps-meter/issues"},"dist":{"shasum":"07b70b93315100a3a86dc7937347742423610262","tarball":"https://registry.npmjs.org/@ant478/fps-meter/-/fps-meter-1.0.0.tgz","fileCount":4,"integrity":"sha512-IK/J9QXBU1usKBRd/V2E9EeF/jz7ZPzby9ECFmHA1y/8rPU9uM9hRU+ZKkah7ywVbY4flwdStCPgJHNmtXmtYQ==","signatures":[{"sig":"MEUCIDZ6KQharuYOIJm1eny1Ba/mebc8/PoynN9GCy83SJlkAiEA/ooxVy44OJrADcBDOZN22pFfwmXYOX86qFUvoKlAEzk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8247},"main":"dist/index.js","engines":{"npm":"10.2.4","node":"20.11.0"},"gitHead":"24c1859566b9b41655493966d09e32e08ab664a9","scripts":{"lint":"eslint src/ build-scripts/ babel.config.js --ext .js","build":"cross-env NODE_ENV=production rollup --compact --config=build-scripts/rollup.config.js","prepack":"npm run build","lint:fix":"eslint src/ build-scripts/ babel.config.js --ext .js --fix","build:dev":"cross-env NODE_ENV=development rollup --compact --config=build-scripts/rollup.config.js","stylelint":"stylelint \"src/**/*.scss\"","stylelint:fix":"stylelint \"src/**/*.scss\" --fix"},"_npmUser":{"name":"ant478","email":"ant478@gmail.com"},"repository":{"url":"git+https://github.com/ant478/fps-meter.git","type":"git"},"_npmVersion":"10.2.4","description":"","directories":{},"_nodeVersion":"20.11.0","browserslist":["last 10 versions, not < 1%, not dead"],"dependencies":{"core-js":"3.37.1","cross-env":"7.0.3","@babel/runtime":"7.24.7","hash-generator":"0.1.0"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"8.57.0","rollup":"2.79.1","postcss":"8.4.39","node-sass":"9.0.0","stylelint":"13.13.1","@babel/core":"7.24.7","babel-eslint":"10.1.0","@babel/preset-env":"7.24.7","postcss-preset-env":"7.8.3","@babel/eslint-parser":"7.24.7","@rollup/plugin-babel":"5.3.1","eslint-plugin-import":"2.29.1","rollup-plugin-delete":"2.0.0","rollup-plugin-terser":"7.0.2","rollup-plugin-postcss":"4.0.2","@rollup/plugin-commonjs":"22.0.2","eslint-config-airbnb-base":"15.0.0","stylelint-config-standard":"22.0.0","@rollup/plugin-node-resolve":"13.3.0","@babel/plugin-transform-runtime":"7.24.7","stylelint-config-sass-guidelines":"8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/fps-meter_1.0.0_1719913202095_0.8354861819421662","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@ant478/fps-meter","version":"1.0.1","author":{"name":"ant478"},"license":"ISC","_id":"@ant478/fps-meter@1.0.1","homepage":"https://github.com/ant478/fps-meter#readme","bugs":{"url":"https://github.com/ant478/fps-meter/issues"},"dist":{"shasum":"f73cc22119fdb21b71e13c2af5f80ec38d13deac","tarball":"https://registry.npmjs.org/@ant478/fps-meter/-/fps-meter-1.0.1.tgz","fileCount":4,"integrity":"sha512-8EYpBcdUG6G2RE/ZzFsbJHBa56RuMgGaA+teXkgv8jKfDTLWJr7gxFoEo4hH7kjOjvj4yzJaJOa3+e4W7DRKXg==","signatures":[{"sig":"MEUCIQCy95UORU7AqzxBlhuAZHnJhgah23htwyNeq/myQN7k8wIgcq9f8+34cNUlekXBqe+qgJ2sQDOT9Kfa5gCs9HR5LcE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8142},"main":"dist/index.js","engines":{"npm":"10.2.4","node":"20.11.0"},"gitHead":"c466cf24e1c9e562d4a9e67afabb04603f462816","scripts":{"lint":"eslint src/ build-scripts/ babel.config.js --ext .js","build":"cross-env NODE_ENV=production rollup --compact --config=build-scripts/rollup.config.js","prepack":"npm run build","lint:fix":"eslint src/ build-scripts/ babel.config.js --ext .js --fix","build:dev":"cross-env NODE_ENV=development rollup --compact --config=build-scripts/rollup.config.js","stylelint":"stylelint \"src/**/*.scss\"","stylelint:fix":"stylelint \"src/**/*.scss\" --fix"},"_npmUser":{"name":"ant478","email":"ant478@gmail.com"},"repository":{"url":"git+https://github.com/ant478/fps-meter.git","type":"git"},"_npmVersion":"10.2.4","description":"","directories":{},"_nodeVersion":"20.11.0","browserslist":["last 10 versions, not < 1%, not dead"],"_hasShrinkwrap":false,"devDependencies":{"eslint":"8.57.0","rollup":"2.79.1","core-js":"3.37.1","postcss":"8.4.39","cross-env":"7.0.3","node-sass":"9.0.0","stylelint":"13.13.1","@babel/core":"7.24.7","babel-eslint":"10.1.0","hash-generator":"0.1.0","@babel/preset-env":"7.24.7","postcss-preset-env":"7.8.3","@babel/eslint-parser":"7.24.7","@rollup/plugin-babel":"5.3.1","eslint-plugin-import":"2.29.1","rollup-plugin-delete":"2.0.0","rollup-plugin-terser":"7.0.2","rollup-plugin-postcss":"4.0.2","@rollup/plugin-commonjs":"22.0.2","eslint-config-airbnb-base":"15.0.0","stylelint-config-standard":"22.0.0","@rollup/plugin-node-resolve":"13.3.0","stylelint-config-sass-guidelines":"8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/fps-meter_1.0.1_1719916779903_0.12387045937799179","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@ant478/fps-meter","version":"1.0.2","author":{"name":"ant478"},"license":"ISC","_id":"@ant478/fps-meter@1.0.2","homepage":"https://github.com/ant478/fps-meter#readme","bugs":{"url":"https://github.com/ant478/fps-meter/issues"},"dist":{"shasum":"bb7a43cdec809770f73792c32681bbcf3dcc4ac6","tarball":"https://registry.npmjs.org/@ant478/fps-meter/-/fps-meter-1.0.2.tgz","fileCount":4,"integrity":"sha512-OirsStJEtJDY9HnCpXMC02cLOLmhiPA/W6t7v15kNgTo7EvAlZjMSRPKKyRfor4AyFxUPnadt/WSzh7AE8swOQ==","signatures":[{"sig":"MEUCIHHibdtqdvC8NSjw0a9sUoGkh1Smd5kVzKdqJGhqS5iHAiEAxzTlb+nTWHH2xcM8bgq2EIWbPeLLv3Lei1zpOCzj96I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11374},"main":"dist/index.js","engines":{"npm":"10.2.4","node":"20.11.0"},"gitHead":"31feaffe32587e28f3e591d379c2050228d23649","scripts":{"lint":"eslint src/ build-scripts/ babel.config.js --ext .js","build":"cross-env NODE_ENV=production rollup --compact --config=build-scripts/rollup.config.js","prepack":"npm run build","lint:fix":"eslint src/ build-scripts/ babel.config.js --ext .js --fix","build:dev":"cross-env NODE_ENV=development rollup --compact --config=build-scripts/rollup.config.js","stylelint":"stylelint \"src/**/*.scss\"","stylelint:fix":"stylelint \"src/**/*.scss\" --fix"},"_npmUser":{"name":"ant478","email":"ant478@gmail.com"},"repository":{"url":"git+https://github.com/ant478/fps-meter.git","type":"git"},"_npmVersion":"10.2.4","description":"Simple tool for displaying page FPS. ![Preview](docs/images/preview.jpg \"Preview\")","directories":{},"_nodeVersion":"20.11.0","browserslist":["last 10 versions, not < 1%, not dead"],"_hasShrinkwrap":false,"devDependencies":{"eslint":"8.57.0","rollup":"2.79.1","core-js":"3.37.1","postcss":"8.4.39","cross-env":"7.0.3","node-sass":"9.0.0","stylelint":"13.13.1","@babel/core":"7.24.7","babel-eslint":"10.1.0","hash-generator":"0.1.0","@babel/preset-env":"7.24.7","postcss-preset-env":"7.8.3","@babel/eslint-parser":"7.24.7","@rollup/plugin-babel":"5.3.1","eslint-plugin-import":"2.29.1","rollup-plugin-delete":"2.0.0","rollup-plugin-terser":"7.0.2","rollup-plugin-postcss":"4.0.2","@rollup/plugin-commonjs":"22.0.2","eslint-config-airbnb-base":"15.0.0","stylelint-config-standard":"22.0.0","@rollup/plugin-node-resolve":"13.3.0","stylelint-config-sass-guidelines":"8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/fps-meter_1.0.2_1719924348830_0.6312623836212246","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"@ant478/fps-meter","version":"1.0.3","main":"dist/index.js","description":"Simple tool for displaying page FPS. ![Preview](docs/images/preview.jpg \"Preview\")","engines":{"node":"20.11.0","npm":"10.2.4"},"scripts":{"build":"cross-env NODE_ENV=production rollup --compact --config=build-scripts/rollup.config.js","build:dev":"cross-env NODE_ENV=development rollup --compact --config=build-scripts/rollup.config.js","lint":"eslint src/ build-scripts/ babel.config.js --ext .js","lint:fix":"eslint src/ build-scripts/ babel.config.js --ext .js --fix","stylelint":"stylelint \"src/**/*.scss\"","stylelint:fix":"stylelint \"src/**/*.scss\" --fix","prepack":"npm run build"},"browserslist":["last 10 versions, not < 1%, not dead"],"repository":{"type":"git","url":"git+https://github.com/ant478/fps-meter.git"},"author":{"name":"ant478"},"license":"ISC","bugs":{"url":"https://github.com/ant478/fps-meter/issues"},"homepage":"https://github.com/ant478/fps-meter#readme","devDependencies":{"@babel/core":"7.24.7","@babel/eslint-parser":"7.24.7","@babel/preset-env":"7.24.7","@rollup/plugin-babel":"5.3.1","@rollup/plugin-commonjs":"22.0.2","@rollup/plugin-node-resolve":"13.3.0","babel-eslint":"10.1.0","core-js":"3.37.1","cross-env":"7.0.3","eslint":"8.57.0","eslint-config-airbnb-base":"15.0.0","eslint-plugin-import":"2.29.1","hash-generator":"0.1.0","node-sass":"9.0.0","postcss":"8.4.39","postcss-preset-env":"7.8.3","rollup":"2.79.1","rollup-plugin-delete":"2.0.0","rollup-plugin-postcss":"4.0.2","rollup-plugin-terser":"7.0.2","stylelint":"13.13.1","stylelint-config-sass-guidelines":"8.0.0","stylelint-config-standard":"22.0.0"},"_id":"@ant478/fps-meter@1.0.3","gitHead":"6d7037c7edb3eb669c5c0ffbdfcb486caaf25b0f","_nodeVersion":"20.11.0","_npmVersion":"10.2.4","dist":{"integrity":"sha512-3JcgkeEONkL1Zog7MZqoxiMICa1/YGRhEtdvXTHx+CG4qwSfI3IAikQoxei/0XMI9gjU9G4J99b3RC9/XPWCeA==","shasum":"27cb4887c227e284c142682d467ad5f653ecc0d7","tarball":"https://registry.npmjs.org/@ant478/fps-meter/-/fps-meter-1.0.3.tgz","fileCount":4,"unpackedSize":11374,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDXcsp6u4YZR/2wdMERJDkPqobDylmcNwULvyoTPkXitQIhAM9t6/8VfhMbErnVwBkohZy6SgfrlxDRhOEfAYKvgDPS"}]},"_npmUser":{"name":"ant478","email":"ant478@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fps-meter_1.0.3_1719926965215_0.7792813446540756"},"_hasShrinkwrap":false}},"time":{"created":"2024-07-02T09:40:01.927Z","modified":"2024-07-02T13:29:25.556Z","1.0.0":"2024-07-02T09:40:02.208Z","1.0.1":"2024-07-02T10:39:40.035Z","1.0.2":"2024-07-02T12:45:48.979Z","1.0.3":"2024-07-02T13:29:25.383Z"},"maintainers":[{"name":"ant478","email":"ant478@gmail.com"}],"author":{"name":"ant478"},"repository":{"type":"git","url":"git+https://github.com/ant478/fps-meter.git"},"license":"ISC","homepage":"https://github.com/ant478/fps-meter#readme","bugs":{"url":"https://github.com/ant478/fps-meter/issues"},"readme":"# ant478 FPS Meter\n\nSimple tool for displaying page FPS.\n![Preview](docs/images/preview.jpg \"Preview\")\n\n## Usage\nTool can be installed and used in several ways, depending on situation:\n\n### Option 1: NPM\n#### For development and production use:\n`npm i @ant478/fps-meter`\n\n```js\n// webpack.config.js\n{\n  plugins: [\n    new CopyPlugin({\n      patterns: [{\n        from: 'node_modules/@ant478/fps-meter/dist',\n        to: '<output-dir>/fps-meter',\n      }],\n    }),\n  ],\n}\n```\n\n```html\n<!-- index.html -->\n<head>\n  <script defer src=\"/fps-meter/index.js\"></script>\n</head>\n```\n\n#### For development only use:\n`npm i @ant478/fps-meter --save-dev`\n\n```js\n// webpack.config.js\n{\n  plugins: [\n    new HtmlWebpackPlugin({\n      templateParameters: {\n        isDevelopment,\n      },\n    }),\n    isDevelopment && new CopyPlugin({\n      patterns: [{\n        from: 'node_modules/@ant478/fps-meter/dist',\n        to: '<output-dir>/fps-meter',\n      }],\n    }),\n  ].filter(Boolean),\n}\n```\n\n```html\n<!-- index.html -->\n<head>\n  <% if (htmlWebpackPlugin.options.templateParameters.isDevelopment) { %>\n    <script defer src=\"/fps-meter/index.js\"></script>\n  <% } %>\n</head>\n```\n\n### Option 2: CDN\n```html\n<head>\n    <!-- same as previous for development and / or production configuration differences -->\n    <script defer src=\"https://cdn.jsdelivr.net/npm/@ant478/fps-meter@latest/dist/index.js\"></script>\n</head>\n```\n\n### Option 3: Console\n```js\n// in dev tool console\nscript = document.createElement('script');\nscript.src = 'https://cdn.jsdelivr.net/npm/@ant478/fps-meter@latest/dist/index.js';\ndocument.head.appendChild(script);\n```\n\n## Configuration\n### Configuration params:\n* `show`: Default `false`. By default FPS meter will be hidden, until manually displayed with API. When `show` param given, FPS meter will be displayed automatically after page loading is finished.\n* `log`: Default `false`. When given, tool will log debug messages to the console.\n* `className`: Default `''`. Class name for the FPS meter element, can be used for applying custom styles.\n* `interval`: Default `500`. Interval (ms) in which FPS value will be recalculated.\n* `namespace`: Default `'fpsMeter'`. A key in `window` object, in which FPS meter API will be placed.\n\n\nTool is configured through setting data-attributes to the `script` element:\n```html\n<!-- for html usage -->\n<script\n  defer\n  src=\"https://cdn.jsdelivr.net/npm/@ant478/fps-meter@latest/dist/index.js\"\n  data-show\n  data-log\n  data-class-name=\"fps-meter-class\"\n  data-interval=\"1000\"\n  data-namespace=\"fpsMeasurer\"\n></script>\n```\n```js\n// for console usage\nscript = document.createElement('script');\nscript.src = 'https://cdn.jsdelivr.net/npm/@ant478/fps-meter@latest/dist/index.js';\nscript.setAttribute('data-show', '');\nscript.setAttribute('data-log', '');\nscript.setAttribute('data-class-name', 'fps-meter-class');\nscript.setAttribute('data-interval', '1000');\nscript.setAttribute('data-namespace', 'fpsMeasurer');\ndocument.head.appendChild(script);\n```\n\n## API\nTool provides simple API, it is located in `window.fpsMeter`. Key in `window` object can be customized using `namespace` configuration param.\n* `window.fpsMeter.show()`: Displays the FPS meter element.\n* `window.fpsMeter.hide()`: Hides the element.\n","readmeFilename":"README.md"}