File: /home/imensosw/.npm/registry.npmjs.org/p-locate/.cache.json
{"_id":"p-locate","_rev":"4-2d4e4f6c6aa5b025d43dee5d015eba48","name":"p-locate","description":"Get the first fulfilled promise that satisfies the provided testing function","dist-tags":{"latest":"3.0.0"},"versions":{"1.0.0":{"name":"p-locate","version":"1.0.0","description":"Get the first fulfilled promise that satisfies the provided testing function","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-locate.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["promise","locate","find","finder","search","searcher","test","array","collection","iterable","iterator","race","fulfilled","fastest","async","await","promises","bluebird"],"dependencies":{"p-map":"^1.1.0"},"devDependencies":{"ava":"*","delay":"^1.3.1","in-range":"^1.0.0","time-span":"^1.0.0","xo":"*"},"xo":{"esnext":true},"gitHead":"3950c4990ccb06fd7846255fa8570dda3efaa153","bugs":{"url":"https://github.com/sindresorhus/p-locate/issues"},"homepage":"https://github.com/sindresorhus/p-locate#readme","_id":"p-locate@1.0.0","_shasum":"0741476fe43666849508fd0b125778982de716aa","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.6.2","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"0741476fe43666849508fd0b125778982de716aa","tarball":"https://registry.npmjs.org/p-locate/-/p-locate-1.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/p-locate-1.0.0.tgz_1479636453993_0.39431346161291003"},"directories":{}},"2.0.0":{"name":"p-locate","version":"2.0.0","description":"Get the first fulfilled promise that satisfies the provided testing function","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-locate.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["promise","locate","find","finder","search","searcher","test","array","collection","iterable","iterator","race","fulfilled","fastest","async","await","promises","bluebird"],"dependencies":{"p-limit":"^1.1.0"},"devDependencies":{"ava":"*","delay":"^1.3.1","in-range":"^1.0.0","time-span":"^1.0.0","xo":"*"},"xo":{"esnext":true},"gitHead":"6300abb6451f04bbaa760f42844ec1c501d79120","bugs":{"url":"https://github.com/sindresorhus/p-locate/issues"},"homepage":"https://github.com/sindresorhus/p-locate#readme","_id":"p-locate@2.0.0","_shasum":"20a0103b222a70c8fd39cc2e580680f3dde5ec43","_from":".","_npmVersion":"3.10.9","_nodeVersion":"7.2.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"20a0103b222a70c8fd39cc2e580680f3dde5ec43","tarball":"https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/p-locate-2.0.0.tgz_1480310721089_0.044998719124123454"},"directories":{}},"3.0.0":{"name":"p-locate","version":"3.0.0","description":"Get the first fulfilled promise that satisfies the provided testing function","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-locate.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=6"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["promise","locate","find","finder","search","searcher","test","array","collection","iterable","iterator","race","fulfilled","fastest","async","await","promises","bluebird"],"dependencies":{"p-limit":"^2.0.0"},"devDependencies":{"ava":"*","delay":"^3.0.0","in-range":"^1.0.0","time-span":"^2.0.0","xo":"*"},"gitHead":"d37f108c0b04779e307b4e7203981caa367bac57","bugs":{"url":"https://github.com/sindresorhus/p-locate/issues"},"homepage":"https://github.com/sindresorhus/p-locate#readme","_id":"p-locate@3.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.2","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==","shasum":"322d69a05c0264b25997d9f40cd8a891ab0064a4","tarball":"https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz","fileCount":4,"unpackedSize":5055,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbI7V+CRA9TVsSAnZWagAAmS8P/iJ5wzoShdXBVPfoNY1O\nr0t03ZiQkJ9Ae4XuJU5C5c2Si7lcgGw8sx6C+iAcYX/zWv7mfygNi+C/ADF5\nZuCBwp0hhC2Nott55961FfTiCHTO2/MRApZo2Eg3sl/ru0KglHvRFS5r/ZXb\n634s++vlPvlbFzCDfELeeM8YOxNjYryRhgNQ6UxXIvsU8RffnrMDXVJphnXE\nWuUEmhgCxzSgH8F/C0DblXoAGkp1qwKAY8MmaWgJpvtIvn2JYC/87S3pdSYy\nMngjVE1MTEulUubGKDmO83N1vM45n1r/pMZarNF2GHynO6SWR68JBPIQ+dmn\nFP4iNv+2eJVExkQzg/DKWNwoPSmq3karaEBU6AJtHRxoe8qgxdjPgjMqPZ0a\n5KieVHs/rwPxKL2/qOSfElcZ5lrnXICuoErKMeR5NjYD5o1Q+7DUhwAWzATv\nS7vP0ZdUCS0+Zt/F7vFk24WzOAhiGNK/aL5TtfKYGu9VmBDj1gJNOVHP+/zl\nRWjSFB9rkVoCYxscx+VYERfgAHqldYF2afgTNOVHy0iNOFelldi1oCT3KP0W\nIMyP1lQE+Nz3Z7JdrFIhe+a2N+swjaadfCw2nk2mesCBvYZDNUeTlQ9ao05h\nFHV0pcoqg98mHz3sklz8aj1phUPkIbbzYd9KPMRAobdjvbtwTQDu2hjYsDXv\niPPm\r\n=9PP9\r\n-----END PGP SIGNATURE-----\r\n"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-locate_3.0.0_1529066877849_0.3762033584213962"}}},"readme":"# p-locate [](https://travis-ci.org/sindresorhus/p-locate)\n\n> Get the first fulfilled promise that satisfies the provided testing function\n\nThink of it like an async version of [`Array#find`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/find).\n\n\n## Install\n\n```\n$ npm install p-locate\n```\n\n\n## Usage\n\nHere we find the first file that exists on disk, in array order.\n\n```js\nconst pathExists = require('path-exists');\nconst pLocate = require('p-locate');\n\nconst files = [\n\t'unicorn.png',\n\t'rainbow.png', // Only this one actually exists on disk\n\t'pony.png'\n];\n\n(async () => {\n\tconst foundPath = await pLocate(files, file => pathExists(file));\n\n\tconsole.log(foundPath);\n\t//=> 'rainbow'\n})();\n```\n\n*The above is just an example. Use [`locate-path`](https://github.com/sindresorhus/locate-path) if you need this.*\n\n\n## API\n\n### pLocate(input, tester, [options])\n\nReturns a `Promise` that is fulfilled when `tester` resolves to `true` or the iterable is done, or rejects if any of the promises reject. The fulfilled value is the current iterable value or `undefined` if `tester` never resolved to `true`.\n\n#### input\n\nType: `Iterable<Promise|any>`\n\n#### tester(element)\n\nType: `Function`\n\nExpected to return a `Promise<boolean>` or boolean.\n\n#### options\n\nType: `Object`\n\n##### concurrency\n\nType: `number`<br>\nDefault: `Infinity`<br>\nMinimum: `1`\n\nNumber of concurrently pending promises returned by `tester`.\n\n##### preserveOrder\n\nType: `boolean`<br>\nDefault: `true`\n\nPreserve `input` order when searching.\n\nDisable this to improve performance if you don't care about the order.\n\n\n## Related\n\n- [p-map](https://github.com/sindresorhus/p-map) - Map over promises concurrently\n- [p-filter](https://github.com/sindresorhus/p-filter) - Filter promises concurrently\n- [p-any](https://github.com/sindresorhus/p-any) - Wait for any promise to be fulfilled\n- [More…](https://github.com/sindresorhus/promise-fun)\n\n\n## License\n\nMIT © [Sindre Sorhus](https://sindresorhus.com)\n","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"time":{"modified":"2018-06-15T12:48:00.782Z","created":"2016-11-20T10:07:34.210Z","1.0.0":"2016-11-20T10:07:34.210Z","2.0.0":"2016-11-28T05:25:21.460Z","3.0.0":"2018-06-15T12:47:57.897Z"},"homepage":"https://github.com/sindresorhus/p-locate#readme","keywords":["promise","locate","find","finder","search","searcher","test","array","collection","iterable","iterator","race","fulfilled","fastest","async","await","promises","bluebird"],"repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-locate.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"bugs":{"url":"https://github.com/sindresorhus/p-locate/issues"},"license":"MIT","readmeFilename":"readme.md","users":{"rocket0191":true},"_attachments":{},"_etag":"W/\"d641e4210e9fd811fc70702d018115a1\"","_lastModified":"Fri, 15 Jun 2018 12:49:29 GMT","_cached":true}