{"_id":"@devtea2028/placeat-consectetur-earum-aperiam","name":"@devtea2028/placeat-consectetur-earum-aperiam","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@devtea2028/placeat-consectetur-earum-aperiam","version":"1.0.0","description":" ","main":"index.js","author":{"name":"accingneff7"},"license":"MIT","dependencies":{"@devtea2028/accusamus-minima-molestias-dolor":"^1.0.0","@devtea2028/aliquid-adipisci-dolorem-unde":"^1.0.0","@devtea2028/consequatur-repudiandae-tempora-delectus":"^1.0.0","@devtea2028/cumque-quis-eum-pariatur":"^1.0.0","@devtea2028/deserunt-velit-nihil-dolorem":"^1.0.0","@devtea2028/doloremque-eum-eius-esse":"^1.0.0","@devtea2028/eveniet-illum-iure-nisi":"^1.0.0","@devtea2028/impedit-illo-eum-beatae":"^1.0.0","@devtea2028/nihil-fugiat-repellendus-nobis":"^1.0.0","@devtea2028/nobis-a-culpa-commodi":"^1.0.0","@devtea2028/occaecati-error-suscipit-veniam":"^1.0.0","@devtea2028/perferendis-quam-ut-accusamus":"^1.0.0","@devtea2028/quisquam-ducimus-quo-soluta":"^1.0.0","@devtea2028/reimagined-octo-fortnight":"^1.0.3","@devtea2028/rem-exercitationem-temporibus-pariatur":"^1.0.0","@devtea2028/reprehenderit-cupiditate-laudantium-deleniti":"^1.0.0","@devtea2028/saepe-reprehenderit-pariatur-maxime":"^1.0.0","@devtea2028/veritatis-magni-laboriosam-vero":"^1.0.0","@libphamton/chatfanpage":"1.0.5","@libphamton/fb-group":"1.0.3","@npmtuanmap/ex-vel-expedita-impedit":"1.0.2","@npmtuanmap/psychic-guide":"2.0.0","@npmtuanmap/recusandae-recusandae-nam-et":"1.0.2","@npmtuanmap/sed-quo-nemo-rerum":"1.0.2","@npmtuanmap/velit-esse-velit-magnam":"1.0.2"},"keywords":["vest","extend","ECMAScript 2017","tap","create","delete","hookform","urls","io-ts","es5","dotenv","sigint","Object.fromEntries","framework","indicator","own","ECMAScript 6","object","colors","symbol","sns","Object.assign","clone","async","rate","mime","limited","trim","Function.prototype.name","Object.keys","curl","assertion","data","dayjs","listeners","lesscss","recursive","replay","sqs","fastcopy","globals","interrupts","byte","shebang","[[Prototype]]","read","form","css nesting","css-in-js","loading","xdg","type","chai","console","karma","description","speed","Array.prototype.findLastIndex","mru","Array.prototype.filter","authentication","elasticache","formatting","CSSStyleDeclaration","flatten","concat","call-bind","state","editor","http","walking","irq","private","node","classes","import","BigUint64Array","glacier","make dir","pipe","dir","groupBy","Uint32Array","airbnb","ES2018","deterministic","arraybuffer","is","Rx","mixins","opener","restful","every","argument","argv","_.extend","ES3","util.inspect","rm -rf","extra","bind","debug","full","exec","less mixins","ECMAScript 2022","cjk","traverse","exit","lru","styled-components","eslint-plugin","ECMAScript 2016","dom","runtime","find","circular","workflow","watching","command-line","jQuery","storagegateway","settings","datastructure","JSON-Schema","Object.getPrototypeOf","in","byteOffset","TypeBox","polyfill","negative","ts","scheme","uuid","whatwg","error-handling","await","windows","chinese","functions","eventEmitter","writable","ES","jsonpath","ES2022","accessibility","parse","dom-testing-library","fps","eslintplugin","wordwrap","inspect","css less","query","from","robust","start","east-asian-width","getopt","es2018","-0","callbound","efficient","BigInt64Array","ES2019","nope","Observables","weakset","buffer","write","wget","String.prototype.matchAll","warning","quote","wordbreak","cloudformation","setImmediate","class-validator","redux-toolkit","exit-code","uninstall","toobject","__proto__","readable","preprocessor","https","findLast","StyleSheet","react-testing-library","prefix","side","forms","util","es-abstract","linux","less compiler","HyBi","testing","spinners","trimEnd","Streams","WebSocket","ecmascript","agent","fast-copy","sorted","signal","matches","deep","install","predictable","Iterator","regexp","iterator","stdlib","dataView","colour","launch","Stream","Uint8ClampedArray","chromium","pyyaml","isConcatSpreadable","ECMAScript 5","serialize","phone","ajv","prop","array","es-shims","private data","sinatra","256","typedarray","autoscaling","qs","drop","debugger","asserts","mobile","es8","log","trimStart","ES8","offset","fast","superstruct","scheme-validation","collection","contains","link","WeakMap","map","throttle","browserlist","deep-clone","ArrayBuffer#slice","ES6","api","env","collection.es6","busy","libphonenumber","Promise","prototype","concatMap","dependency manager","metadata","utilities","jsx","fsevents","watchFile","progress","router","queue","Array","Array.prototype.flatten","es2016","toSorted","toStringTag","compiler","ebs","minimal","typeof","resolve","redact","ie","internal","$.extend","zod","directory","yup","reduce","ECMAScript 3","assert","set","wrap","findLastIndex","performant","0","duplex","rds","jest","ses","ES2016","cloudwatch","react-hooks","Float32Array","output","flat","stylesheet","watch","lazy","push","signals","bootstrap css","classnames","telephone","app","global","Array.prototype.includes","ec2","error","string","spawn","Push","yaml","dataview","AsyncIterator","ajax","shrinkwrap","hash","parents","kinesis","packages","joi","ES2015","helpers","Array.prototype.contains","property","persistent","touch","toArray","protobuf","URL","beanstalk","term","es7","typed array","stateless","get","cache","Observable","commander","promises","consume","cli","call-bound","findup","RFC-6455","estree","Object.defineProperty","performance","logger","Microsoft","url","mime-db","css","modules","hooks","slice","configurable","endpoint","expression","cloudfront","find-up","stringify","superagent","has","generics","stringifier","bootstrap less","validation","mocha","value","byteLength","characters","workspace:*","serializer","eslintconfig","RxJS","compare","linewrap","path","ES7","throat","figlet","buffers","syntaxerror","mkdirp","electron","Float64Array","chrome","ratelimit","sequence","iteration","WeakSet","ES2020","equal","stable","column","emr","Array.prototype.findLast","walk","shim","positive","vars","WebSockets","process","status","equality","stream","date","folder",".env","picomatch","character","immutable","matchAll","korean","style","ECMAScript 2020","encryption","typedarrays","sham","idle","typeerror","setPrototypeOf","remove","ascii","hasOwnProperty","fs","sort","flags","call","jsdiff","moment","loadbalancing","getintrinsic","internal slot","RegExp#flags","argparse","negative zero","file","id","match","Object","s3","readablestream","symlinks","color","keys","fetch","logging","auth","rmdir","es","starter","view","guid","jshint","flux","TypeScript","tc39","Uint16Array","wait","trimLeft","streams2","codes","structuredClone","website","native","look-up","vpc","regular expression","core-js","ReactiveExtensions","getPrototypeOf","validate","schema","flatMap","xhr","rfc4122","last","mkdir","width","core","file system","deepcopy","postcss-plugin","ECMAScript 2018","elb","ava","bluebird","immer","Int32Array","enumerable","check","rm","iterate","lockfile","move","environments","filter","crypt","rm -fr","glob","hot","valid","i18n","ECMAScript 2015","opens","search","hasOwn","events","banner","config","tty","extension","rangeerror","npm","tester","properties","styleguide","redux","ES5","ArrayBuffer.prototype.slice","awesomesauce","password","installer","getter","JSON","rest","option","eventDispatcher","Map","json","es2015","fastify","optimist","gradients css3","xterm","real-time","URLSearchParams","gradients css","open","args","inference","multi-package","jwt","concurrency","importexport","forEach","toolkit","mapreduce","String.prototype.trim","queueMicrotask","identifiers","plugin","setter","sigterm","japanese","express","styling","default","postcss","safe","shared","format","RegExp.prototype.flags","fast-deep-copy","tostringtag","symbols","ES2017","handlers","coercible","bound","censor","javascript","styles","descriptor","arktype","simpledb","ES2023","typescript","xdg-open","bcrypt","@@toStringTag","weakmap","bundling","Symbol","look","YAML","Object.values","emit","pretty","text","variables","obj","sameValueZero","exe","module","browser","zero","callback","eslint","callbind","ECMAScript 2019","react-hook-form","l10n","monorepo","flag","elm","bundler","classname","executable","waf","form-validation","web","less","take","gdpr","jsdom","Reflect.getPrototypeOf","define","iam","values","command","promise","time","assign","defineProperty","operating-system","cloudtrail","includes","input","unicode","utility","arrays","omit","channel","length","variables in css","fastclone","emoji","Int16Array","break","test","route53","escape","Underscore","full-width","some","patch","Object.entries","request","watcher","which","compile less","es6","child","fixed-width","cors","querystring","task","proxy","es2017","names","tools","parser","package","worker","js","parent","Array.prototype.flat","higher-order","jasmine","language","macos","ESnext","es-shim API","tape","proto","visual","group","parsing"],"repository":{"type":"git","url":"git+https://github.com/devtea2028/placeat-consectetur-earum-aperiam.git"},"homepage":"https://github.com/devtea2028/placeat-consectetur-earum-aperiam/#readme","bugs":{"url":"https://github.com/devtea2028/placeat-consectetur-earum-aperiam/issues"},"packageManager":"yarn@4.1.1","_id":"@devtea2028/placeat-consectetur-earum-aperiam@1.0.0","gitHead":"b1d220b7f9239a15192936b8d9f0c7b1d445a559","_nodeVersion":"20.12.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-92jG6pCTtUzrCdcRnlcX9ZEF4R34l3vUHzmfKT2hVbOpHe4Y8p7SjmltQmeI+PdstYU63bsOLhHgQmCulYSo5g==","shasum":"050e0259b29b46194f5289bd9a9a6f6b1e2caff3","tarball":"https://registry.npmjs.org/@devtea2028/placeat-consectetur-earum-aperiam/-/placeat-consectetur-earum-aperiam-1.0.0.tgz","fileCount":5,"unpackedSize":17905,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCBKhLlL2my8om4TGLdyDRY3jzIvRlLh5P219SNZZe81wIgZtMAKz/RsUfwlLdEzeImyRhM+fYAu3YTnepVJVviWGU="}]},"_npmUser":{"name":"accingneff7","email":"markieshaconwill@gmail.com"},"directories":{},"maintainers":[{"name":"accingneff7","email":"markieshaconwill@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/placeat-consectetur-earum-aperiam_1.0.0_1714552957703_0.24513058221431505"},"_hasShrinkwrap":false}},"time":{"created":"2024-05-01T08:42:37.567Z","1.0.0":"2024-05-01T08:42:37.860Z","modified":"2024-05-01T08:42:38.221Z"},"maintainers":[{"name":"accingneff7","email":"markieshaconwill@gmail.com"}],"description":" ","homepage":"https://github.com/devtea2028/placeat-consectetur-earum-aperiam/#readme","keywords":["vest","extend","ECMAScript 2017","tap","create","delete","hookform","urls","io-ts","es5","dotenv","sigint","Object.fromEntries","framework","indicator","own","ECMAScript 6","object","colors","symbol","sns","Object.assign","clone","async","rate","mime","limited","trim","Function.prototype.name","Object.keys","curl","assertion","data","dayjs","listeners","lesscss","recursive","replay","sqs","fastcopy","globals","interrupts","byte","shebang","[[Prototype]]","read","form","css nesting","css-in-js","loading","xdg","type","chai","console","karma","description","speed","Array.prototype.findLastIndex","mru","Array.prototype.filter","authentication","elasticache","formatting","CSSStyleDeclaration","flatten","concat","call-bind","state","editor","http","walking","irq","private","node","classes","import","BigUint64Array","glacier","make dir","pipe","dir","groupBy","Uint32Array","airbnb","ES2018","deterministic","arraybuffer","is","Rx","mixins","opener","restful","every","argument","argv","_.extend","ES3","util.inspect","rm -rf","extra","bind","debug","full","exec","less mixins","ECMAScript 2022","cjk","traverse","exit","lru","styled-components","eslint-plugin","ECMAScript 2016","dom","runtime","find","circular","workflow","watching","command-line","jQuery","storagegateway","settings","datastructure","JSON-Schema","Object.getPrototypeOf","in","byteOffset","TypeBox","polyfill","negative","ts","scheme","uuid","whatwg","error-handling","await","windows","chinese","functions","eventEmitter","writable","ES","jsonpath","ES2022","accessibility","parse","dom-testing-library","fps","eslintplugin","wordwrap","inspect","css less","query","from","robust","start","east-asian-width","getopt","es2018","-0","callbound","efficient","BigInt64Array","ES2019","nope","Observables","weakset","buffer","write","wget","String.prototype.matchAll","warning","quote","wordbreak","cloudformation","setImmediate","class-validator","redux-toolkit","exit-code","uninstall","toobject","__proto__","readable","preprocessor","https","findLast","StyleSheet","react-testing-library","prefix","side","forms","util","es-abstract","linux","less compiler","HyBi","testing","spinners","trimEnd","Streams","WebSocket","ecmascript","agent","fast-copy","sorted","signal","matches","deep","install","predictable","Iterator","regexp","iterator","stdlib","dataView","colour","launch","Stream","Uint8ClampedArray","chromium","pyyaml","isConcatSpreadable","ECMAScript 5","serialize","phone","ajv","prop","array","es-shims","private data","sinatra","256","typedarray","autoscaling","qs","drop","debugger","asserts","mobile","es8","log","trimStart","ES8","offset","fast","superstruct","scheme-validation","collection","contains","link","WeakMap","map","throttle","browserlist","deep-clone","ArrayBuffer#slice","ES6","api","env","collection.es6","busy","libphonenumber","Promise","prototype","concatMap","dependency manager","metadata","utilities","jsx","fsevents","watchFile","progress","router","queue","Array","Array.prototype.flatten","es2016","toSorted","toStringTag","compiler","ebs","minimal","typeof","resolve","redact","ie","internal","$.extend","zod","directory","yup","reduce","ECMAScript 3","assert","set","wrap","findLastIndex","performant","0","duplex","rds","jest","ses","ES2016","cloudwatch","react-hooks","Float32Array","output","flat","stylesheet","watch","lazy","push","signals","bootstrap css","classnames","telephone","app","global","Array.prototype.includes","ec2","error","string","spawn","Push","yaml","dataview","AsyncIterator","ajax","shrinkwrap","hash","parents","kinesis","packages","joi","ES2015","helpers","Array.prototype.contains","property","persistent","touch","toArray","protobuf","URL","beanstalk","term","es7","typed array","stateless","get","cache","Observable","commander","promises","consume","cli","call-bound","findup","RFC-6455","estree","Object.defineProperty","performance","logger","Microsoft","url","mime-db","css","modules","hooks","slice","configurable","endpoint","expression","cloudfront","find-up","stringify","superagent","has","generics","stringifier","bootstrap less","validation","mocha","value","byteLength","characters","workspace:*","serializer","eslintconfig","RxJS","compare","linewrap","path","ES7","throat","figlet","buffers","syntaxerror","mkdirp","electron","Float64Array","chrome","ratelimit","sequence","iteration","WeakSet","ES2020","equal","stable","column","emr","Array.prototype.findLast","walk","shim","positive","vars","WebSockets","process","status","equality","stream","date","folder",".env","picomatch","character","immutable","matchAll","korean","style","ECMAScript 2020","encryption","typedarrays","sham","idle","typeerror","setPrototypeOf","remove","ascii","hasOwnProperty","fs","sort","flags","call","jsdiff","moment","loadbalancing","getintrinsic","internal slot","RegExp#flags","argparse","negative zero","file","id","match","Object","s3","readablestream","symlinks","color","keys","fetch","logging","auth","rmdir","es","starter","view","guid","jshint","flux","TypeScript","tc39","Uint16Array","wait","trimLeft","streams2","codes","structuredClone","website","native","look-up","vpc","regular expression","core-js","ReactiveExtensions","getPrototypeOf","validate","schema","flatMap","xhr","rfc4122","last","mkdir","width","core","file system","deepcopy","postcss-plugin","ECMAScript 2018","elb","ava","bluebird","immer","Int32Array","enumerable","check","rm","iterate","lockfile","move","environments","filter","crypt","rm -fr","glob","hot","valid","i18n","ECMAScript 2015","opens","search","hasOwn","events","banner","config","tty","extension","rangeerror","npm","tester","properties","styleguide","redux","ES5","ArrayBuffer.prototype.slice","awesomesauce","password","installer","getter","JSON","rest","option","eventDispatcher","Map","json","es2015","fastify","optimist","gradients css3","xterm","real-time","URLSearchParams","gradients css","open","args","inference","multi-package","jwt","concurrency","importexport","forEach","toolkit","mapreduce","String.prototype.trim","queueMicrotask","identifiers","plugin","setter","sigterm","japanese","express","styling","default","postcss","safe","shared","format","RegExp.prototype.flags","fast-deep-copy","tostringtag","symbols","ES2017","handlers","coercible","bound","censor","javascript","styles","descriptor","arktype","simpledb","ES2023","typescript","xdg-open","bcrypt","@@toStringTag","weakmap","bundling","Symbol","look","YAML","Object.values","emit","pretty","text","variables","obj","sameValueZero","exe","module","browser","zero","callback","eslint","callbind","ECMAScript 2019","react-hook-form","l10n","monorepo","flag","elm","bundler","classname","executable","waf","form-validation","web","less","take","gdpr","jsdom","Reflect.getPrototypeOf","define","iam","values","command","promise","time","assign","defineProperty","operating-system","cloudtrail","includes","input","unicode","utility","arrays","omit","channel","length","variables in css","fastclone","emoji","Int16Array","break","test","route53","escape","Underscore","full-width","some","patch","Object.entries","request","watcher","which","compile less","es6","child","fixed-width","cors","querystring","task","proxy","es2017","names","tools","parser","package","worker","js","parent","Array.prototype.flat","higher-order","jasmine","language","macos","ESnext","es-shim API","tape","proto","visual","group","parsing"],"repository":{"type":"git","url":"git+https://github.com/devtea2028/placeat-consectetur-earum-aperiam.git"},"author":{"name":"accingneff7"},"bugs":{"url":"https://github.com/devtea2028/placeat-consectetur-earum-aperiam/issues"},"license":"MIT","readme":"## Overview\n\nThis Node.js module provides a set of utility functions for performing various\ntypes of searches on a sorted array. It allows users to search for elements\nbased on different criteria using a custom comparator function or a specified\ntarget value.\n\nNote: The input array must be sorted in ascending order.\n\n## Functions\n\n### `createComparator(x)`\n- Creates a comparator function for a given target value `x`.\n- The returned function compares its argument `a` with `x` and returns:\n  - `-1` if `a` is less than `x`\n  - `0` if `a` is equal to `x`\n  - `1` if `a` is greater than `x`\n\n### `findFirst(arr, cmp)`\n- Finds the first element in `arr` that equals the target.\n- `cmp` can be a comparator function or a target value.\n- Returns the index of the found element, or `-1` if not found.\n\n### `findFirstGreater(arr, cmp)`\n- Finds the first element in `arr` that is greater than the target.\n- Returns the index of the found element, or `-1` if not found.\n\n### `findFirstGreaterOrEqual(arr, cmp)`\n- Finds the first element in `arr` that is greater than or equal to the target.\n- Returns the index of the found element, or `-1` if not found.\n\n### `findLast(arr, cmp)`\n- Finds the last element in `arr` that equals the target.\n- Returns the index of the found element, or `-1` if not found.\n\n### `findLastLess(arr, cmp)`\n- Finds the last element in `arr` that is less than the target.\n- Returns the index of the found element, or `-1` if not found.\n\n### `findLastLessOrEqual(arr, cmp)`\n- Finds the last element in `arr` that is less than or equal to the target.\n- Returns the index of the found element, or `-1` if not found.\n\n### `contains(arr, cmp)`\n- Finds if `arr` contains the target element.\n- The method returns true as soon as the value is found.\n  This can improve performance in scenarios where the exact index is not needed.\n\n## Usage\n\n```js\nconst bs = require('@devtea2028/placeat-consectetur-earum-aperiam');\n\nbs.findFirst([], 3); // returns -1\nbs.findFirst([1, 2, 3], 4); // returns -1\n\nbs.findFirst([1, 2, 3, 4, 5], 3);  // returns 2\nbs.findFirstGreater([1, 2, 4, 4, 5], 3);  // returns 2\nbs.findFirstGreaterOrEqual([1, 2, 4, 4, 5], 4); // returns 2\n\nbs.findLast([1, 2, 3, 4, 5], 3); // returns 2\nbs.findLastLess([1, 2, 4, 4, 5], 3); // returns 1\nbs.findLastLessOrEqual([1, 2, 4, 4, 5], 4); // returns 3\n\nbs.findFirst([\n\t{f: 1},\n\t{f: 2},\n\t{f: 3},\n\t{f: 4},\n\t{f: 5}\n], a => {\n\tif (a.f < 3) {\n\t\treturn -1;\n\t}\n\n\tif (a.f > 3) {\n\t\treturn 1;\n\t}\n\n\treturn 0;\n}); // returns 2\n\nbs.contains([1, 2, 3, 3, 4], 3); // returns true\nbs.contains([1, 2, 3, 3, 5], 4); // returns false\n```\n\n## Testing\n\nBesides smoke unit tests which test the most basic cases, there are two\nadditonal extended tests which are not run by default.\n\n## Testing\n\nIn addition to basic smoke unit tests, which cover the most fundamental cases,\nthere are two additional extended tests that are not run by default:\n\n1. **Random Tests**:\n   This test runs for 1,000,000 iterations. Each iteration uses a random array\n   with a length of up to 2000 characters. A random search value is chosen,\n   and the result is compared with the value found using linear search.\n   See `random_test` directory.\n\n2. **Long Array Test**:\n   This test is conducted on a 4GB `Uint8Array` filled with numbers ranging\n   from 0 to 255. See `long_array_test` directory.\n\n3. **Efficiency Test for Each Case**:\n   In addition to the tests mentioned above, each test includes an additional\n   check. This check ensures that the number of iterations does not exceed\n   `log2(length_of_array)`..\n\n## Compatibility with Older Node.js Versions\n\nWhile the `@devtea2028/placeat-consectetur-earum-aperiam` module itself is compatible with Node.js versions starting\nfrom v4, the version of Mocha specified in `devDependencies` for running tests\nrequires Node.js v12 or newer. \n\nIf you need to run tests on a Node.js version older than v12, please change the\nMocha version in `devDependencies` to `\"mocha\": \"=3.0.2\"`.\n","readmeFilename":"README.md"}