{"versions":{"1.0.6":{"name":"@seznam/compose-react-refs","version":"1.0.6","description":"A simple utility for composing two or more react refs into a single callback ref.","main":"composeRefs.js","types":"./composeRefs.d.ts","scripts":{"build":"rm -rf dist/ && npm test && npm run compile && cp LICENSE package.json README.md composeRefs.ts dist/","compile":"tsc --project .","prepublishOnly":"echo 'Run \\'npm run publish-package\\' instead' && exit 1","publish-package":"git push && git push --tags && npm run build && npm publish --access=public --ignore-scripts dist","test":"tslint --project . && jest && stryker run"},"repository":{"type":"git","url":"git+https://github.com/seznam/compose-react-refs.git"},"keywords":["react","ref","refs","combine","compose","multiple","chain"],"author":{"name":"Martin Jurča","email":"martin.jurca@firma.seznam.cz"},"license":"ISC","bugs":{"url":"https://github.com/seznam/compose-react-refs/issues"},"homepage":"https://github.com/seznam/compose-react-refs#readme","devDependencies":{"@stryker-mutator/core":"^2.0.0","@stryker-mutator/html-reporter":"^2.0.0","@stryker-mutator/jest-runner":"^2.0.0","@stryker-mutator/typescript":"^2.0.0","@types/jest":"^24.0.13","@types/react":"^16.8.19","jest":"^24.8.0","react":"^16.8.6","ts-jest":"^24.0.2","tslint":"^5.17.0","tslint-microsoft-contrib":"^6.2.0","typescript":"^3.5.1"},"_id":"@seznam/compose-react-refs@1.0.6","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"shasum":"6ec4e70bdd6e32f8e70b4100f27267cf306bd8df","size":3745,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@seznam/compose-react-refs/-/compose-react-refs-1.0.6.tgz","integrity":"sha512-izzOXQfeQLonzrIQb8u6LQ8dk+ymz3WXTIXjvOlTXHq6sbzROg3NWU+9TTAOpEoK9Bth24/6F/XrfHJ5yR5n6Q=="},"_npmUser":{"name":"anonymous","email":"mjurca@centrum.cz"},"directories":{},"maintainers":[{"name":"anonymous","email":"mjurca@centrum.cz"},{"name":"anonymous","email":"miroslav.jancarik@centrum.cz"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/compose-react-refs_1.0.6_1616155837174_0.1008028987982239"},"_hasShrinkwrap":false,"publish_time":1616155837338,"_cnpm_publish_time":1616155837338,"_cnpmcore_publish_time":"2021-12-16T18:00:29.824Z","contributors":[]},"1.0.5":{"name":"@seznam/compose-react-refs","version":"1.0.5","description":"A simple utility for composing two or more react refs into a single callback ref.","main":"composeRefs.js","scripts":{"build":"rm -rf dist/ && npm test && npm run compile && cp LICENSE package.json README.md composeRefs.ts dist/","compile":"tsc --project .","prepublishOnly":"echo 'Run \\'npm run publish-package\\' instead' && exit 1","publish-package":"git push && git push --tags && npm run build && npm publish --access=public --ignore-scripts dist","test":"tslint --project . && jest && stryker run"},"repository":{"type":"git","url":"git+https://github.com/seznam/compose-react-refs.git"},"keywords":["react","ref","refs","combine","compose","multiple","chain"],"author":{"name":"Martin Jurča","email":"martin.jurca@firma.seznam.cz"},"license":"ISC","bugs":{"url":"https://github.com/seznam/compose-react-refs/issues"},"homepage":"https://github.com/seznam/compose-react-refs#readme","devDependencies":{"@stryker-mutator/core":"^2.0.0","@stryker-mutator/html-reporter":"^2.0.0","@stryker-mutator/jest-runner":"^2.0.0","@stryker-mutator/typescript":"^2.0.0","@types/jest":"^24.0.13","@types/react":"^16.8.19","jest":"^24.8.0","react":"^16.8.6","ts-jest":"^24.0.2","tslint":"^5.17.0","tslint-microsoft-contrib":"^6.2.0","typescript":"^3.5.1"},"_id":"@seznam/compose-react-refs@1.0.5","_nodeVersion":"14.15.1","_npmVersion":"6.14.8","dist":{"shasum":"151750dea81d0937d004245133c52924cb75e60e","size":3729,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@seznam/compose-react-refs/-/compose-react-refs-1.0.5.tgz","integrity":"sha512-1g4QJywCPQNMW5pURqtcljjXvhyzeSSLGJOcMDFg3LCH1/g5uhFkvYUPOepCwOZxfrvR7UrWOhyBMoc5LIeMHA=="},"_npmUser":{"name":"anonymous","email":"mjurca@centrum.cz"},"directories":{},"maintainers":[{"name":"anonymous","email":"mjurca@centrum.cz"},{"name":"anonymous","email":"miroslav.jancarik@centrum.cz"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/compose-react-refs_1.0.5_1606394004953_0.5401221092198993"},"_hasShrinkwrap":false,"publish_time":1606394005079,"_cnpm_publish_time":1606394005079,"_cnpmcore_publish_time":"2021-12-16T18:00:30.088Z","contributors":[]},"1.0.4":{"name":"@seznam/compose-react-refs","version":"1.0.4","description":"A simple utility for composing two or more react refs into a single callback ref.","main":"composeRefs.js","scripts":{"build":"rm -rf dist/ && npm test && npm run compile && cp LICENSE package.json README.md dist/","compile":"tsc --project .","prepublishOnly":"echo 'Run \\'npm run publish-package\\' instead' && exit 1","publish-package":"git push && git push --tags && npm run build && npm publish --access=public --ignore-scripts dist","test":"tslint --project . && jest && stryker run"},"repository":{"type":"git","url":"git+https://github.com/seznam/compose-react-refs.git"},"keywords":["react","ref","refs","combine","compose","multiple","chain"],"author":{"name":"Martin Jurča","email":"martin.jurca@firma.seznam.cz"},"license":"ISC","bugs":{"url":"https://github.com/seznam/compose-react-refs/issues"},"homepage":"https://github.com/seznam/compose-react-refs#readme","devDependencies":{"@stryker-mutator/core":"^2.0.0","@stryker-mutator/html-reporter":"^2.0.0","@stryker-mutator/jest-runner":"^2.0.0","@stryker-mutator/typescript":"^2.0.0","@types/jest":"^24.0.13","@types/react":"^16.8.19","jest":"^24.8.0","react":"^16.8.6","ts-jest":"^24.0.2","tslint":"^5.17.0","tslint-microsoft-contrib":"^6.2.0","typescript":"^3.5.1"},"_id":"@seznam/compose-react-refs@1.0.4","_nodeVersion":"12.13.0","_npmVersion":"6.12.0","dist":{"shasum":"9dd29c8c503b85955b4478bf115caa608b4e87ab","size":3432,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@seznam/compose-react-refs/-/compose-react-refs-1.0.4.tgz","integrity":"sha512-TwrojUAFVSd+HPAdnul0o65X8mIam+dJOxcWI6LhHAUIpVRk2cJp2dyWXWl6sJvZTY9ODSJpOibt7JKSNUjVfQ=="},"maintainers":[{"name":"anonymous","email":"mjurca@centrum.cz"},{"name":"anonymous","email":"miroslav.jancarik@centrum.cz"}],"_npmUser":{"name":"anonymous","email":"mjurca@centrum.cz"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/compose-react-refs_1.0.4_1572855181563_0.8810300852542101"},"_hasShrinkwrap":false,"publish_time":1572855181818,"_cnpm_publish_time":1572855181818,"_cnpmcore_publish_time":"2021-12-16T18:00:30.331Z","contributors":[]},"1.0.3":{"name":"@seznam/compose-react-refs","version":"1.0.3","description":"A simple utility for composing two or more react refs into a single callback ref.","main":"composeRefs.js","scripts":{"build":"rm -rf dist/ && npm test && npm run compile && cp LICENSE package.json README.md dist/","compile":"tsc --project .","prepublishOnly":"echo 'Run \\'npm run publish-package\\' instead' && exit 1","publish-package":"git push && git push --tags && npm run build && npm publish --access=public --ignore-scripts dist","test":"tslint --project . && jest && stryker run"},"repository":{"type":"git","url":"git+https://github.com/seznam/compose-react-refs.git"},"keywords":["react","ref","refs","combine","compose","multiple","chain"],"author":{"name":"Martin Jurča","email":"martin.jurca@firma.seznam.cz"},"license":"ISC","bugs":{"url":"https://github.com/seznam/compose-react-refs/issues"},"homepage":"https://github.com/seznam/compose-react-refs#readme","devDependencies":{"@stryker-mutator/core":"^2.0.0","@stryker-mutator/html-reporter":"^2.0.0","@stryker-mutator/jest-runner":"^2.0.0","@stryker-mutator/typescript":"^2.0.0","@types/jest":"^24.0.13","@types/react":"^16.8.19","jest":"^24.8.0","react":"^16.8.6","ts-jest":"^24.0.2","tslint":"^5.17.0","tslint-microsoft-contrib":"^6.2.0","typescript":"^3.5.1"},"_id":"@seznam/compose-react-refs@1.0.3","_nodeVersion":"12.13.0","_npmVersion":"6.12.0","dist":{"shasum":"7d22b8d11f36ba2ba51f80a5b78c3df68de59947","size":3215,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@seznam/compose-react-refs/-/compose-react-refs-1.0.3.tgz","integrity":"sha512-2DsrCGHHcy7LyCL/6tmAkhUstwWpNTd3cjkxr7OqzAYb4ivdm/i3Jem5KC8lpZ2OzoPTdpTBMPGKjumyoHwTUw=="},"maintainers":[{"name":"anonymous","email":"mjurca@centrum.cz"},{"name":"anonymous","email":"miroslav.jancarik@centrum.cz"}],"_npmUser":{"name":"anonymous","email":"mjurca@centrum.cz"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/compose-react-refs_1.0.3_1572629807982_0.7359567541402694"},"_hasShrinkwrap":false,"publish_time":1572629808089,"_cnpm_publish_time":1572629808089,"_cnpmcore_publish_time":"2021-12-16T18:00:30.525Z","contributors":[]},"1.0.2":{"name":"@seznam/compose-react-refs","version":"1.0.2","description":"A simple utility for composing two or more react refs into a single callback ref.","main":"composeRefs.js","scripts":{"build":"rm -rf dist/ && npm test && npm run compile && cp LICENSE package.json README.md dist/","compile":"tsc --project .","prepublishOnly":"echo 'Run \\'npm run publish-package\\' instead' && exit 1","publish-package":"git push && git push --tags && npm run build && npm publish --access=public --ignore-scripts dist","test":"tslint --project . && jest && stryker run"},"repository":{"type":"git","url":"git+https://github.com/seznam/compose-react-refs.git"},"keywords":["react","ref","refs","combine","compose","multiple","chain"],"author":{"name":"Martin Jurča","email":"martin.jurca@firma.seznam.cz"},"license":"ISC","bugs":{"url":"https://github.com/seznam/compose-react-refs/issues"},"homepage":"https://github.com/seznam/compose-react-refs#readme","devDependencies":{"@stryker-mutator/core":"^2.0.0","@stryker-mutator/html-reporter":"^2.0.0","@stryker-mutator/jest-runner":"^2.0.0","@stryker-mutator/typescript":"^2.0.0","@types/jest":"^24.0.13","@types/react":"^16.8.19","jest":"^24.8.0","react":"^16.8.6","ts-jest":"^24.0.2","tslint":"^5.17.0","tslint-microsoft-contrib":"^6.2.0","typescript":"^3.5.1"},"_id":"@seznam/compose-react-refs@1.0.2","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"shasum":"6167c8b0a1f6d98bcdac79b8e7e2a1a450bfd072","size":3143,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@seznam/compose-react-refs/-/compose-react-refs-1.0.2.tgz","integrity":"sha512-SpI8PXdcw2UjYnbgubn+GHIyb3jrQRkZlsNuzIFYnxTXBfNyAUmf7rlOYuqO9MlKiC80amL6aP+ZTi1ccTYVfA=="},"maintainers":[{"name":"anonymous","email":"mjurca@centrum.cz"},{"name":"anonymous","email":"miroslav.jancarik@centrum.cz"}],"_npmUser":{"name":"anonymous","email":"mjurca@centrum.cz"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/compose-react-refs_1.0.2_1564723647166_0.37382396808610596"},"_hasShrinkwrap":false,"publish_time":1564723647343,"_cnpm_publish_time":1564723647343,"_cnpmcore_publish_time":"2021-12-16T18:00:30.763Z","contributors":[]},"1.0.1":{"name":"@seznam/compose-react-refs","version":"1.0.1","description":"A simple utility for composing two or more react refs into a single callback ref.","main":"composeRefs.js","scripts":{"build":"rm -rf dist/ && npm test && npm run compile && cp LICENSE package.json README.md dist/","compile":"tsc --project .","prepublishOnly":"echo 'Run \\'npm run publish-package\\' instead' && exit 1exit 1","publish-package":"git push && git push --tags && npm run build && npm publish --access=public --ignore-scripts dist","test":"tslint --project . && jest && stryker run"},"repository":{"type":"git","url":"git+https://github.com/seznam/compose-react-refs.git"},"keywords":["react","ref","refs","combine","compose","multiple","chain"],"author":{"name":"Martin Jurča","email":"martin.jurca@firma.seznam.cz"},"license":"ISC","bugs":{"url":"https://github.com/seznam/compose-react-refs/issues"},"homepage":"https://github.com/seznam/compose-react-refs#readme","devDependencies":{"@stryker-mutator/core":"^2.0.0","@stryker-mutator/html-reporter":"^2.0.0","@stryker-mutator/jest-runner":"^2.0.0","@stryker-mutator/typescript":"^2.0.0","@types/jest":"^24.0.13","@types/react":"^16.8.19","jest":"^24.8.0","react":"^16.8.6","ts-jest":"^24.0.2","tslint":"^5.17.0","tslint-microsoft-contrib":"^6.2.0","typescript":"^3.5.1"},"_id":"@seznam/compose-react-refs@1.0.1","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"shasum":"4774425c3c75912d7e539f2cec76731b243c6c63","size":3062,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@seznam/compose-react-refs/-/compose-react-refs-1.0.1.tgz","integrity":"sha512-sItQQwIBqzCpxEUuH1+wpSPu4Ob3EZ502wldUDPWkPkMUnUkbRXvtXZqvQdWXGaFdOa/myS472bNf5TBC3KtKw=="},"maintainers":[{"name":"anonymous","email":"mjurca@centrum.cz"},{"name":"anonymous","email":"miroslav.jancarik@centrum.cz"}],"_npmUser":{"name":"anonymous","email":"mjurca@centrum.cz"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/compose-react-refs_1.0.1_1561468522233_0.6866049591092849"},"_hasShrinkwrap":false,"publish_time":1561468522330,"_cnpm_publish_time":1561468522330,"_cnpmcore_publish_time":"2021-12-16T18:00:30.982Z","contributors":[]},"1.0.0":{"name":"@seznam/compose-react-refs","version":"1.0.0","description":"A simple utility for composing two or more react refs into a single callback ref.","main":"composeRefs.js","scripts":{"build":"rm -rf dist/ && npm test && npm run compile && cp LICENSE package.json README.md dist/","compile":"tsc --project .","prepublishOnly":"echo 'Run \\'npm run publish-package\\' instead' && exit 1exit 1","publish-package":"git push && git push --tags && npm run build && npm publish --access=public --ignore-scripts dist","test":"tslint --project . && jest && stryker run"},"repository":{"type":"git","url":"git+https://github.com/seznam/compose-react-refs.git"},"keywords":["react","ref","refs","combine","compose","multiple","chain"],"author":{"name":"Martin Jurča","email":"martin.jurca@firma.seznam.cz"},"license":"ISC","bugs":{"url":"https://github.com/seznam/compose-react-refs/issues"},"homepage":"https://github.com/seznam/compose-react-refs#readme","devDependencies":{"@stryker-mutator/core":"^2.0.0","@stryker-mutator/html-reporter":"^2.0.0","@stryker-mutator/jest-runner":"^2.0.0","@stryker-mutator/typescript":"^2.0.0","@types/jest":"^24.0.13","@types/react":"^16.8.19","jest":"^24.8.0","react":"^16.8.6","ts-jest":"^24.0.2","tslint":"^5.17.0","tslint-microsoft-contrib":"^6.2.0","typescript":"^3.5.1"},"_id":"@seznam/compose-react-refs@1.0.0","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"shasum":"71374ef4728b8632f348f5de616dc20c3c553b7f","size":3040,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@seznam/compose-react-refs/-/compose-react-refs-1.0.0.tgz","integrity":"sha512-rn+tMZ3BSAG7djFhCOra+FaQwa5hH1IdXRl+ZesdlPVEfgtif6jIox5Kzuxqsz+oXs8VKmJfCYHW8NwVySw1YA=="},"maintainers":[{"name":"anonymous","email":"mjurca@centrum.cz"},{"name":"anonymous","email":"miroslav.jancarik@centrum.cz"}],"_npmUser":{"name":"anonymous","email":"mjurca@centrum.cz"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/compose-react-refs_1.0.0_1560334762630_0.23708683537698905"},"_hasShrinkwrap":false,"publish_time":1560334762808,"_cnpm_publish_time":1560334762808,"_cnpmcore_publish_time":"2021-12-16T18:00:31.184Z","contributors":[]},"0.0.0":{"name":"@seznam/compose-react-refs","version":"0.0.0","description":"A simple utility for composing two or more react refs into a single callback ref.","main":"composeRefs.js","scripts":{"build":"rm -rf dist/ && npm test && npm run compile && cp LICENSE package.json README.md dist/","compile":"tsc --project .","prepublishOnly":"echo 'Run \\'npm run publish-package\\' instead' && exit 1exit 1","publish-package":"git push && git push --tags && npm run build && npm publish --access=public --ignore-scripts dist","test":"tslint --project . && jest"},"repository":{"type":"git","url":"git+https://github.com/seznam/compose-react-refs.git"},"keywords":["react","ref","refs","combine","compose","multiple","chain"],"author":{"name":"Martin Jurča","email":"martin.jurca@firma.seznam.cz"},"license":"ISC","bugs":{"url":"https://github.com/seznam/compose-react-refs/issues"},"homepage":"https://github.com/seznam/compose-react-refs#readme","devDependencies":{"@types/jest":"^24.0.13","@types/react":"^16.8.19","jest":"^24.8.0","react":"^16.8.6","ts-jest":"^24.0.2","tslint":"^5.17.0","tslint-microsoft-contrib":"^6.2.0","typescript":"^3.5.1"},"_id":"@seznam/compose-react-refs@0.0.0","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"shasum":"8228f127e2b6e6fb2706bb7a241ddc6097a2770a","size":2877,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@seznam/compose-react-refs/-/compose-react-refs-0.0.0.tgz","integrity":"sha512-O+aEHgROdHXcAJGumvWNxqQBK1W8R7Ro5XhWgBXCae0pvedXta3W+wQFkyazY6e44G2jOp9wj/XCIYFlvDF+5Q=="},"maintainers":[{"name":"anonymous","email":"mjurca@centrum.cz"},{"name":"anonymous","email":"miroslav.jancarik@centrum.cz"}],"_npmUser":{"name":"anonymous","email":"mjurca@centrum.cz"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/compose-react-refs_0.0.0_1560330913698_0.6223867435454384"},"_hasShrinkwrap":false,"publish_time":1560330913843,"_cnpm_publish_time":1560330913843,"_cnpmcore_publish_time":"2021-12-16T18:00:31.584Z","contributors":[]}},"dist-tags":{"latest":"1.0.6"},"name":"@seznam/compose-react-refs","time":{"created":"2022-01-26T14:23:28.622Z","modified":"2023-07-31T05:07:33.433Z","1.0.6":"2021-03-19T12:10:37.338Z","1.0.5":"2020-11-26T12:33:25.079Z","1.0.4":"2019-11-04T08:13:01.818Z","1.0.3":"2019-11-01T17:36:48.089Z","1.0.2":"2019-08-02T05:27:27.343Z","1.0.1":"2019-06-25T13:15:22.330Z","1.0.0":"2019-06-12T10:19:22.808Z","0.0.0":"2019-06-12T09:15:13.843Z"},"readme":"# Compose react refs\n\n[![Build Status](https://travis-ci.org/seznam/compose-react-refs.svg?branch=master)](https://travis-ci.org/seznam/compose-react-refs)\n[![npm](https://img.shields.io/npm/v/@seznam/compose-react-refs.svg)](https://www.npmjs.com/package/@seznam/compose-react-refs)\n[![License](https://img.shields.io/npm/l/@seznam/compose-react-refs.svg)](LICENSE)\n![npm type definitions](https://img.shields.io/npm/types/@seznam/compose-react-refs.svg)\n\nA simple utility for composing two or more\n[react refs](https://reactjs.org/docs/refs-and-the-dom.html) (ref objects and\ncallbacks are both supported and can be mixed) into a single callback ref. This\nenables you to effectively\n[set multiple refs on the same component/element](https://github.com/facebook/react/issues/13029).\n\nThis utility does not use\n[react hooks](https://reactjs.org/docs/hooks-intro.html), therefore it can be\nused in class components (and even outside of react world) safely.\n\n## Installation\n\n`compose-react-refs` is available as npm package, you can use `npm` to install\nit:\n\n```\nnpm install --save @seznam/compose-react-refs\n```\n\n## Usage\n\nThe following example shows usage in a functional component that composes an\nexternal ref with its own ref it uses to focus the renderer `<input>` element:\n\n```typescript jsx\nimport * as React from 'react'\nimport composeRefs from '@seznam/compose-react-refs'\n\nexport default React.forwardRef((props, externalRef) => {\n  const myRef = React.useRef(null)\n  \n  React.useEffect(() => {\n    myRef.current.focus()\n  })\n\n  // No need to worry about nulls and undefined refs here, they will be\n  // filtered out automatically.\n  return <input {...props} ref={composeRefs(myRef, externalRef)}/>\n})\n```\n\nThe `composeRefs` function allows combining any number of refs:\n\n```typescript jsx\nimport * as React from 'react'\nimport composeRefs from '@seznam/compose-react-refs'\n\nexport default React.forwardRef((props, externalRef) => {\n  const myRef = React.useRef(null)\n  const otherRef = React.useRef(null)\n  return <input {...props} ref={composeRefs(myRef, null, undefined, otherRef, props.extraRef, externalRef)}/>\n})\n```\n\nThe refs will be updated in the order in which they were provided to the\n`composeRefs` function. The composed ref passed to react is cached (no need to\nuse [`useMemo`](https://reactjs.org/docs/hooks-reference.html#usememo) in your\ncode), improving performance and preventing\n[unexpected ref updates](https://reactjs.org/docs/refs-and-the-dom.html#caveats-with-callback-refs).","users":{}}