{"_id":"@advanced-rest-client/bytes-counter","_rev":"13-c5380e884bde5f580cbd422cc8277bcf","name":"@advanced-rest-client/bytes-counter","dist-tags":{"latest":"3.0.2"},"versions":{"3.0.0-preview.1":{"name":"@advanced-rest-client/bytes-counter","version":"3.0.0-preview.1","keywords":["web-components","polymer","bytes-counter","counters"],"license":"Apache-2.0","_id":"@advanced-rest-client/bytes-counter@3.0.0-preview.1","maintainers":[{"name":"jarrodek","email":"jarrodek@gmail.com"}],"contributors":[{"name":"Pawel Psztyc"},{"name":"The Advanced REST client authors","email":"arc@mulesoft.com"}],"homepage":"https://github.com/advanced-rest-client/bytes-counter#readme","bugs":{"url":"https://github.com/advanced-rest-client/bytes-counter/issues","email":"arc@mulesoft.com"},"dist":{"shasum":"b61800a2dea0ccc6a800028b4066039ce4aee461","tarball":"https://registry.npmjs.org/@advanced-rest-client/bytes-counter/-/bytes-counter-3.0.0-preview.1.tgz","fileCount":6,"integrity":"sha512-hrz2B4yTI+t+ZmUr8bBnC30xWawyqzmIGV3XZpjuqJDALl9cXaLNbxdS+wpapMJgFBGmGuecQyV1OwPAmr/peA==","signatures":[{"sig":"MEUCIQDkmLiX87rbltNuTtt7TKN7tIWbJtxPI3Q5DAwo/3sDpQIgXFvS+c9BO0KkivRlbIb+zznUna/50TabMHel4BxVT+M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":41523,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJclvjaCRA9TVsSAnZWagAAKtEQAI9gl1fkuDDG1hX2E04e\nGpvhyf34BxMnIBSvQSpVBO3hu26CM1h1z+HkWhu/mcjXHQhFJRw5HfrZ2lcw\n1B1G5/T9kA9saja0RdDYKrlFqiiGa24XREPX3602C7zFWEs6TXLwUB9sbEpz\nOYKum2ogsYZp6FM6pRuu/CKoNQLw0GzdqXuwWvlmo0m+l9JYeoKfvun7jWNn\nI4bYArnO9/pz0Lr/l+p5pEYoxY8Bf5rg0IUaRQGyR9o63HzOfScOcQmtsHTI\nxHRSNtHwKnkC0hxKPKVSfJu0BdPRKn4OyUMPOCs2KY9F0eTqCGCVR4dbF+j6\n2Gnbpo+AIqi4LGUHtGfxWKhvY74msVvqh4zNkiw2lxVulQ+8l4QmQmRwP/u4\nRBVbbX6e/Wwl1VPZIa1tYvffRcITAJeTpQBNLv8v+hMVnz5B6Bockvp1yQu5\nfBndZufuPC4nNUeriYyzBnwZZp9GDSwn+QpzjyuYqT+/hgy6UVSCBb5LGnD9\nauWGw78aB05rDNTikkrMmiKA8NMfISKOrjwo9RdKACxNBOONA7L3Ki/mI8I6\n9c6XFEbmIr6R3w5GlUZrG3vM5o5qcxo4je8vdgmHkZsoP0hb6bBJ5wz4soCc\nY9068VWL7q6moyYVofrhpa7Y/HSq4GAc1/ODLCY/PSGyXz1LmcSHk2ptci6J\nuNnj\r\n=4fba\r\n-----END PGP SIGNATURE-----\r\n"},"main":"bytes-counter.js","authors":["Pawel Psztyc","The Advanced REST client authors <arc@mulesoft.com>"],"gitHead":"cbba5f82e5cd3c09e72eff8a9cbd3d10c77587bb","scripts":{"lint":"polymer lint bytes-counter.html","test":"polymer test --plugin local","test-sauce":"polymer test --plugin sauce --job-name \"bytes-counter:local-test\"","update-types":"gen-typescript-declarations --deleteExisting --outDir ."},"_npmUser":{"name":"jarrodek","email":"jarrodek@gmail.com"},"repository":{"url":"git://github.com/advanced-rest-client/bytes-counter.git","type":"git"},"_npmVersion":"6.9.0","description":"An element that couns number of bytes in string or object","directories":{},"_nodeVersion":"10.15.3","dependencies":{"@polymer/polymer":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.2.0","mocha":"^5.2.0","sinon":"^7.2.3","wct-mocha":"^1.0.0","@polymer/paper-toast":"^3.0.0","@polymer/test-fixture":"^4.0.2","@polymer/iron-demo-helpers":"^3.0.0","@polymer/iron-component-page":"^4.0.0","@webcomponents/webcomponentsjs":"^2.0.0","@polymer/gen-typescript-declarations":"^1.6.1"},"_npmOperationalInternal":{"tmp":"tmp/bytes-counter_3.0.0-preview.1_1553397977943_0.22712552025172328","host":"s3://npm-registry-packages"}},"3.0.0":{"name":"@advanced-rest-client/bytes-counter","version":"3.0.0","keywords":["web-components","polymer","bytes-counter","counters"],"license":"Apache-2.0","_id":"@advanced-rest-client/bytes-counter@3.0.0","maintainers":[{"name":"jarrodek","email":"jarrodek@gmail.com"}],"contributors":[{"name":"Pawel Psztyc"},{"name":"The Advanced REST client authors","email":"arc@mulesoft.com"}],"homepage":"https://github.com/advanced-rest-client/bytes-counter#readme","bugs":{"url":"https://github.com/advanced-rest-client/bytes-counter/issues","email":"arc@mulesoft.com"},"dist":{"shasum":"0ae06dc2839eb71c78c4edb33054014a307dbe75","tarball":"https://registry.npmjs.org/@advanced-rest-client/bytes-counter/-/bytes-counter-3.0.0.tgz","fileCount":7,"integrity":"sha512-EruTcUVKMlOuSl6SCJHt+5hKOqAloy1KoHNCspDzNDUc7O/IpFMhGm/AY9T+o6Rl6uoKy2z9XxdK4QpRjV7BMA==","signatures":[{"sig":"MEUCIFKHndniSfFUvUbM2wzW+D0hzzl9MgEZqXx0hJgF0okpAiEA4Pwxmjd47SmE7bJQOBQdw3cAFLYo0QlaTdzdn9qTEDo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51011,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc8XUDCRA9TVsSAnZWagAAqQ0P/3gX6lvTeMAyDx2eNz9m\nfumWOft0kcrIYE8AiHyLvoOOIINoLk+6G9LKHmejxkIJHCOuf1hX5R/RGR6j\n/heRsPQ1wWK/ZDzWXgczI5MmKwcwMxukkgRa73kbA9mKhytHT1/OnxarHPDs\nHoe0+V63TggFfSHyEzRaqc8irG5Yh582+kXooUzysS93ESbqTY/IWMs8aEOL\nhWTwZG+XL4x5ORaknnpvoWmJnpV772o/lkuoa8pUVLueN8QqxwiMlsNPbeCK\nuGJwdbpImynOqGtt1Pv3G1k1CNSl7Xg7v+NVm12Tld7/+NawYhael56XiJzF\ngJbTCz0F42D1JfT/Vb8jjNZqBXWiaYqzs5PGpToMizGQri52DDE2REOMMRBO\nSbn0D1eKULTJmTsTTpMjn8mMuJWLoOuaFhMpyQxaKUnFW0bZN5k7IOpF3hiI\ngek6YijDzpeqfNeZN4i1msacYJkyoEFP14ueARcbR7mWG9Jx89jzJIhobOoE\ndSOOE15pOi50HMAXUTCaSfDzAk1WZfsSW3yaaAh2WrqcXS+0zlzlD3GkFyMk\nQBF0R/NfcfNOWa6h4/x8CavuS5SQIzDla+h/gdPfGraSikFmxsfT73mI01bD\nUwUplndyujNlnj70+3FEI8v1lISVzmLmxVLvHxiJ/xJZQIIfHen9Sa5jc/40\nSV7R\r\n=+OPN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"bytes-counter.js","authors":["Pawel Psztyc","The Advanced REST client authors <arc@mulesoft.com>"],"gitHead":"6255922bd031937c04d0d8d62a9a21c1c457fabc","scripts":{"lint":"polymer lint bytes-counter.html","test":"polymer test --plugin local","test-sauce":"polymer test --plugin sauce --job-name \"bytes-counter:local-test\"","update-types":"gen-typescript-declarations --deleteExisting --outDir ."},"_npmUser":{"name":"jarrodek","email":"jarrodek@gmail.com"},"deprecated":"This component is deprecated","repository":{"url":"git://github.com/advanced-rest-client/bytes-counter.git","type":"git"},"_npmVersion":"6.9.0","description":"An element that couns number of bytes in string or object","directories":{},"_nodeVersion":"12.3.1","dependencies":{"@polymer/polymer":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.2.0","mocha":"^5.2.0","sinon":"^7.2.3","wct-mocha":"^1.0.0","@polymer/paper-toast":"^3.0.0","@polymer/test-fixture":"^4.0.2","@polymer/iron-demo-helpers":"^3.0.0","@polymer/iron-component-page":"^4.0.0","@webcomponents/webcomponentsjs":"^2.0.0","@polymer/gen-typescript-declarations":"^1.6.1"},"_npmOperationalInternal":{"tmp":"tmp/bytes-counter_3.0.0_1559328002424_0.13218637955831491","host":"s3://npm-registry-packages"}},"3.0.1":{"name":"@advanced-rest-client/bytes-counter","version":"3.0.1","keywords":["web-components","bytes-counter","counters"],"license":"Apache-2.0","_id":"@advanced-rest-client/bytes-counter@3.0.1","maintainers":[{"name":"jarrodek","email":"jarrodek@gmail.com"}],"contributors":[{"name":"Pawel Psztyc"},{"name":"The Advanced REST client authors","email":"arc@mulesoft.com"}],"homepage":"https://github.com/advanced-rest-client/bytes-counter#readme","bugs":{"url":"https://github.com/advanced-rest-client/bytes-counter/issues","email":"arc@mulesoft.com"},"dist":{"shasum":"7549fbfbb2e533e2ae29b70bc2922826a05dc7be","tarball":"https://registry.npmjs.org/@advanced-rest-client/bytes-counter/-/bytes-counter-3.0.1.tgz","fileCount":11,"integrity":"sha512-43MvY5cxsnjZ11hqqueSsrYfrwvQc4W59DbgcWZwrYnfTxtz4qpQ7w8V39Cbxjdbrx2RDaYBvW5EwuseiI1e3A==","signatures":[{"sig":"MEUCIQD9akgWQWn80hWDIlfH6UsoKKlG+fKbZw4FcI+iKEM64wIgRFkb2wD2OuOUp7Od0IlXDeW5yufI+jjPPjEJhLHjGOI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51076,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdKB9UCRA9TVsSAnZWagAAS2MP/3H7ByRRRezKU1xL2+t1\n9eaSDd2SYH/13Ejps5G4LxGq9x8v4uEOU3sz0kT4xKt6quk8/tQ6fpu7wHbm\n4gtSiU3xiUpUyf2xYzsCSj/DEcWzQst2u9R5RfL8RLCGG7vbaV7RUy3EBkST\n7wDygtFH0H2lUyvOCP0sbxFv2dNtkWdIVMrJRwuXpubFnfjVL57KeMAa9o3D\nEkpFqxaY47EwlrT7PZRiT/tmZ0rXzFivUAcJNSnVQRDmhq68Z9THz/DKWZh+\nGGiK9+JY3JG68GsKvnJWYmuXaEB01MtkovZ6EmS17hi7/lXTwn5cSSNwracR\nodBDofennEbNolIYrSz4GgtiUIr5wDV14nBrn2LEK/8RmsNIgwh7GLHBMZ0y\nXyY1ApzdDstebCThnx+f9KNljq0x2CuI2banYZZn6VQmgo0G/j7zSAwdZRvB\nJQub62/A90P5XSwVloLFGD5WjDZLeh9X5v5QsK4mwHrxJhaUg9TscEhaaX4f\n2GKcElD6FqytMFhXEQifOkiAOMnN+XYqFmwd9NNs/zs4xl0I6BUhfXIaya8R\nF35aNIzjgv4FY58MYy5wh2iMoEqiEIVLKsGn8KKaEncjeddXD6Kw94xvVt7Z\nI4TFK9KTK3+TliNDS8tFc2Hr9hGHa0Lre8WmO5KKP2y4yectDdgdjnZK25Ke\nLpuY\r\n=vQfQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"bytes-counter.js","authors":["Pawel Psztyc","The Advanced REST client authors <arc@mulesoft.com>"],"gitHead":"201301f06685a662b4a7d9bcb37db8062c79fd45","scripts":{"lint":"npm run lint:eslint && npm run lint:prettier","test":"karma start --coverage","start":"owc-dev-server --app-index demo/index.html --open --watch","format":"npm run format:eslint && npm run format:prettier","test:sl":"karma start karma.sl.config.js --legacy --coverage","test:watch":"karma start --auto-watch=true --single-run=false","lint:eslint":"eslint --ext .js,.html .","test:legacy":"karma start --legacy --coverage","update-types":"gen-typescript-declarations --deleteExisting --outDir .","format:eslint":"eslint --ext .js,.html . --fix","lint:prettier":"prettier \"**/*.js\" --list-different || (echo '↑↑ these files are not prettier formatted ↑↑' && exit 1)","format:prettier":"prettier \"**/*.js\" --write","test:legacy:watch":"karma start --legacy --auto-watch=true --single-run=false"},"_npmUser":{"name":"jarrodek","email":"jarrodek@gmail.com"},"deprecated":"This component is deprecated","repository":{"url":"git://github.com/advanced-rest-client/bytes-counter.git","type":"git"},"_npmVersion":"6.10.0","description":"An element that couns number of bytes in string or object","directories":{},"lint-staged":{"*.js":["eslint --fix","git add"]},"_nodeVersion":"10.15.3","dependencies":{"lit-element":"^2.0.1"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^1.0.0","sinon":"^7.3.2","lint-staged":"^8.0.0","webpack-merge":"^4.1.5","owc-dev-server":"^1.0.0","@commitlint/cli":"^7.0.0","@open-wc/testing":"^0.11.1","@polymer/paper-toast":"^3.0.0","@open-wc/eslint-config":"^0.4.1","@open-wc/testing-karma":"^2.0.6","@open-wc/prettier-config":"^0.1.0","@commitlint/config-conventional":"^7.0.0","@advanced-rest-client/a11y-suite":"^1.0.0","@polymer/gen-typescript-declarations":"^1.6.2","@advanced-rest-client/arc-demo-helper":"^1.0.3","@advanced-rest-client/testing-karma-sl":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/bytes-counter_3.0.1_1562910547329_0.3001402707253378","host":"s3://npm-registry-packages"}},"3.0.2":{"name":"@advanced-rest-client/bytes-counter","version":"3.0.2","keywords":["web-components","bytes-counter","counters"],"license":"Apache-2.0","_id":"@advanced-rest-client/bytes-counter@3.0.2","maintainers":[{"name":"jarrodek","email":"jarrodek@gmail.com"}],"contributors":[{"name":"Pawel Psztyc"},{"name":"The Advanced REST client authors","email":"arc@mulesoft.com"}],"homepage":"https://github.com/advanced-rest-client/bytes-counter#readme","bugs":{"url":"https://github.com/advanced-rest-client/bytes-counter/issues","email":"arc@mulesoft.com"},"dist":{"shasum":"ae5ca48163d3bfcc498598746346eb9de0347ce7","tarball":"https://registry.npmjs.org/@advanced-rest-client/bytes-counter/-/bytes-counter-3.0.2.tgz","fileCount":8,"integrity":"sha512-8962qqxETrsyi360hkXZrfxo20xFtLToQYJucbq7Abbb/pGVm+uidF3UzlAchP+cDuZT/AguwvsVkxEmdDgI/Q==","signatures":[{"sig":"MEYCIQDignihMiOAb12p/X++zaewFFOQV+B/UKBJkpuaPZtTZAIhAK7aKGyWZs3wDH1nH4oRurU0SbErvzwi8Ia9Gsbhtgl0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51004,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdavgzCRA9TVsSAnZWagAAE7UQAJwou9POJ/1OIid3Qwq2\n4Zx05Yi2T9PB71naj0Ks1Nt6hDPXLVzNMMGNhd7Whsi+zgBLztMoFS921rt3\nzXZ8XIIJb3HDxvql2RPX5GIfkBmlRXLCKSLqIFWocRCcviReXK9q2efbtEML\n2+IjbjLgibM0ri37olR0+u6cwknwECRxpjmDSTalsmjG2QqcFLwVfWrRZgmv\nWxz824fxOZ/cw7QRizPYk4SJpgCFrD+sWvybXXQmiUtxKa4gZKi4QWFXbgxK\noSu99i/eXOWvUB96eb0IUb/46eUdAkqhCkGuD3Ika41ftrIfn380taa1Vtpg\nSDFjet6ICWdMa4VB1kcOIWvUR34XjdJHFvrOoIpd+9WHWIlfOkpDmy3ejzA0\nI9HiipoO3Fdx/EKRaIxfjQQiIDp6+Hq3pEesCrepQsxa6V+AisfXuuh4dJE2\nfBaPdVi42AXDJ4tWsR3rpxTAuLYOkYC93zJWWSfz/d/vTyTnb/nwCBuzjopj\n3ngGJwUEWCpArSdTLhf/ydiHnMSbs9qoyAgExUOHNB5WL2tduAPJhrFRjbAf\nT1xqZ05LCxpvMRfhRCNhnwhcSpP8J1FnYjyAjBs5n3lom7UzQV8ewDs4v4dl\nD+efpIwVfKqHcx8M7R++rFiJ6xlak0exWMEchOvdavfcDYqC0M2C7zQeqtJo\nNntz\r\n=mMW8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"bytes-counter.js","authors":["Pawel Psztyc","The Advanced REST client authors <arc@mulesoft.com>"],"gitHead":"eaae0e5ccfd9251ba8acb77c1c645c2041bf231c","scripts":{"lint":"npm run lint:eslint && npm run lint:prettier","test":"karma start --coverage","format":"npm run format:eslint && npm run format:prettier","test:sl":"karma start karma.sl.config.js --compatibility all --coverage","test:watch":"karma start --auto-watch=true --single-run=false","lint:eslint":"eslint --ext .js,.html . --ignore-path .gitignore","update-types":"gen-typescript-declarations --deleteExisting --outDir .","format:eslint":"eslint --ext .js,.html . --fix --ignore-path .gitignore","lint:prettier":"prettier \"**/*.js\" --check --ignore-path .gitignore","format:prettier":"prettier \"**/*.js\" --write --ignore-path .gitignore","test:compatibility":"karma start --compatibility all --coverage","test:prune-snapshots":"karma start --prune-snapshots","test:update-snapshots":"karma start --update-snapshots","test:compatibility:watch":"karma start --compatibility all --auto-watch=true --single-run=false"},"_npmUser":{"name":"jarrodek","email":"jarrodek@gmail.com"},"deprecated":"This component is deprecated","repository":{"url":"git://github.com/advanced-rest-client/bytes-counter.git","type":"git"},"_npmVersion":"6.11.2","description":"An element that couns number of bytes in string or object","directories":{},"lint-staged":{"*.js":["eslint --fix","git add"]},"_nodeVersion":"10.15.3","dependencies":{"lit-element":"^2.2.1"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^1.0.0","karma":"^4.2.0","sinon":"^7.4.1","deepmerge":"^4.0.0","lint-staged":"^9.2.5","@commitlint/cli":"^8.1.0","@open-wc/testing":"^2.2.8","@polymer/paper-toast":"^3.0.0","@open-wc/testing-karma":"^3.1.28","@commitlint/config-conventional":"^7.0.0","@advanced-rest-client/eslint-config":"^1.1.1","@polymer/gen-typescript-declarations":"^1.6.2","@advanced-rest-client/prettier-config":"^0.1.0","@advanced-rest-client/testing-karma-sl":"^1.0.3","@advanced-rest-client/arc-data-generator":"^3.0.2"},"_npmOperationalInternal":{"tmp":"tmp/bytes-counter_3.0.2_1567291442685_0.03685014935342279","host":"s3://npm-registry-packages"}}},"time":{"created":"2019-03-24T03:26:17.793Z","modified":"2026-04-07T19:24:19.915Z","3.0.0-preview.1":"2019-03-24T03:26:18.126Z","3.0.0":"2019-05-31T18:40:02.617Z","3.0.1":"2019-07-12T05:49:07.469Z","3.0.2":"2019-08-31T22:44:02.825Z"},"bugs":{"url":"https://github.com/advanced-rest-client/bytes-counter/issues","email":"arc@mulesoft.com"},"license":"Apache-2.0","homepage":"https://github.com/advanced-rest-client/bytes-counter#readme","keywords":["web-components","bytes-counter","counters"],"repository":{"url":"git://github.com/advanced-rest-client/bytes-counter.git","type":"git"},"description":"An element that couns number of bytes in string or object","contributors":[{"name":"Pawel Psztyc"},{"name":"The Advanced REST client authors","email":"arc@mulesoft.com"}],"maintainers":[{"email":"jarrodek@gmail.com","name":"jarrodek"},{"email":"alexperez@mulesoft.com","name":"alexperez_march_2024"},{"email":"elmellidiego@gmail.com","name":"dmacias"}],"readme":"[![Published on NPM](https://img.shields.io/npm/v/@advanced-rest-client/bytes-counter.svg)](https://www.npmjs.com/package/@advanced-rest-client/bytes-counter)\n\n[![Build Status](https://travis-ci.org/advanced-rest-client/bytes-counter.svg?branch=stage)](https://travis-ci.org/advanced-rest-client/bytes-counter)\n\n[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/@advanced-rest-client/bytes-counter)\n\nAn element that computes number of bytes in `String`, `ArrayBuffer`, `Blob` (and therefore `File`) and - in supported browsers - from `FormData`.\n\nNote that Safari is excluded from FormData tests because there's some bug in WebKit implementation of the `Request` object and it doesn't read `FormData` properly. Chrome had similar bug but they fixed it already. See demo page to check if your browser support `FormData`.\n\nThis element is native web component without using any library.\nDo not set attributes as this element do not observe changes to any. Use templating system of your choice to set a property on the element or use it imperatively.\n\n## Example\n\n### In a Polymer template\n\n```html\n<textarea value=\"{{value::input}}\"></textarea>\n<bytes-counter value=\"[[value]]\" bytes=\"{{bytes}}\"></bytes-counter>\n```\n\n### In a LitElement template\n\n```javascript\nimport { LitElement, html } from 'lit-element';\nimport '@advanced-rest-client/bytes-counter/bytes-counter.js';\n\nclass SampleElement extends LitElement {\n  render() {\n    return html`\n    <textarea @input=\"${this._inputHandler}\"></textarea>\n    <bytes-counter .value=\"${this.value}\" @change=\"${this._computeHandler}\"></bytes-counter>\n    `;\n  }\n\n  _inputHandler(e) {\n    const { value } = e.target;\n    this.value = value;\n  }\n\n  _computeHandler(e) {\n    const { value } = e.detail;\n    console.log(`Computed input size is ${value} bytes`);\n  }\n}\ncustomElements.define('sample-element', SampleElement);\n```\n\n### Imperative use\n\n```html\n<textarea id=\"i1\"></textarea>\n<bytes-counter id=\"b1\"></bytes-counter>\n<output id=\"o1\"></output>\n<script>\n{\n  document.getElementById('i1').addEventListener('input', (e) => {\n    const { value } = e.target;\n    document.getElementById('b1').value = value;\n  });\n  document.getElementById('b1').addEventListener('bytes-changed', (e) => {\n    const { value } = e.detail;\n    document.getElementById('o1').value = `Current input has ${value} bytes`;\n  });\n}\n</script>\n```\n\nNote that computations are asynchronous and there is a delay between setting the `value` property and getting a result.\n\n## New in version 3\n\n-   Dropped support for Polymer library. It is not plain web component.\n-   Added `aria-hidden` attribute\n-   Added debouncer when setting the `value`\n-   Deprecating `bytes-changed` event. Use `change` event instead. This event is kept for compatibility with Polymer.\n\n### Development\n\n```sh\ngit clone https://github.com/@advanced-rest-client/bytes-counter\ncd bytes-counter\nnpm install\n```\n\n### Running the demo locally\n\n```sh\nnpm start\n```\n\n### Running the tests\n```sh\nnpm test\n```\n","readmeFilename":"README.md"}