diff --git a/.eslintrc b/.eslintrc index 195d5e2..17ec087 100644 --- a/.eslintrc +++ b/.eslintrc @@ -18,6 +18,7 @@ }, "rules": { "no-unused-vars": "off", + "no-undef": "off", "prettier/prettier": [ "error", { diff --git a/README.md b/README.md index 6463aca..2fa2887 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,188 @@ # 함수형 프로그래밍 스터디 -> 함수형 프로그래밍이라는 개념과 철학을 공부해서 함수형 사고에 초점을 맞춥시다🔎 +> 함수형 프로그래밍이라는 개념과 철학을 공부해서 함수형 사고에 초점을 맞춥시다 🔎 + +> 자신이 만든 함수형 유틸도 NPM에 배포하여 오픈소스로 관리하는 사이드적인 경험을 가져갑니다 💼 + +
⛔️ 이 스터디는 팀 과제 중심형입니다. +⛔️ **오프라인**으로 진행되며, 모든 과제는 온라인으로 수행됩니다. + + +
+ + + + +
+ +
+ +## 📝 규칙 +- 늦어도 괜찮습니다! 참여하시면 적극적으로 임해주세요. +- 과제를 하지 않아도 괜찮지만, 자신이 배우고자 한다면 꼭 수행하길 권장합니다. +- 내가 성장하고자 한다면 다른 이를 피드백하세요. 코드 리뷰 문화는 같이 만들어 갑니다. +- 불참 선언해도 초기에 입금한 스터디 참여비는 반환되지 않고, 온전히 스터디 종료 시 책거리 비용으로 사용됩니다. + +
+ ## 🙋‍♂️진행 방식 -- [태오](https://github.com/developer-1px)가 간단한 개념을 설명하고, 팀 별로 라이브 과제를 수행합니다. -- [파랑](https://github.com/InSeong-So)이 복습용 과제를 할당하고, 이를 풀어 팀원들과 공유해봅니다. +- [태오](https://github.com/developer-1px)가 간단한 개념을 설명하고, 팀 별로 실습 과제를 수행합니다. `파랑`이 준비한 코드나 문제가 있다면 이를 해결해봅니다. +- [파랑](https://github.com/InSeong-So)이 실습 코드와 복습용 과제를 할당하고, 이를 풀어 팀원들과 공유한 뒤 코드 리뷰를 진행합니다. +- 1부는 **함수형 철학**에 대한 개념 공부, 2부는 **함수형 유틸리티를 구현**하고 그 원리를 파헤치는 시간입니다. +- 팀별 브런치로 운용됩니다. 개인용 파일이 들어가는 경우 `src/하위의 각 폴더/{자신의 이름}`으로 폴더를 구성한 뒤 커밋합니다. +- 주마다 과제 혹은 복습을 할 주제를 드립니다. 수행하는 것은 자신의 몫이나, 적극적으로 해결하려고 하면 많은 것들을 시도할 수 있습니다. + +
+ +## 💡 시작하기 +> 해당 프로젝트는 npm으로 진행하시면 됩니다. 물론, yarn/pnpm도 상관 없어요. +> - eslint, prettier 등을 기본적으로 제공합니다. +> - 단위 테스트가 가능한 jest, e2e 용 cypress도 함께 설정된 프로젝트 폴더이므로 자유롭게 진행하시면 됩니다. + +```sh +git clone https://github.com/FECrash/FunctionalProgramming.git + +cd ./FunctionalProgramming + +npm install # 또는 npm i +``` + +### 🤔 각 폴더 설명 +> 1부 +- `src/1week` : 더 좋게 바꿀 수 있는 방법은 무엇일까요? 간단한 함수를 리팩토링 해봅시다. +- `src/2week` : 책에 소개된 로직을 앱으로 구현한 프로젝트입니다. 함수형 철학을 토대로 리팩토링 해봅시다. + - 단, 몇 개의 버그를 남겨 두었습니다. NaN이 된다던가, 무료 배송 아이콘을 어떤 조건에 출력해야 하는지 등... 원하는 대로 확장시켜 보세요. + - 테스트 프레임워크를 잘 활용하여 안전하고 견고한 앱으로 만들어 봅시다. + +> 1부 종료 및 2부를 여는 시간 +- `src/make-your-package` : npm에 배포하는 프로세스를 경험하는 프로젝트입니다. + +> 2부 +- `src/refactoring` : 리팩토링 전과, 그 후. 어떤 차이가 있을까요? 어떻게 고민하면 좀 더 클린 코드 철학을 녹여서 만들 수 있을까요? +- `src/utils` : 여러분이 구현하는 함수형 유틸리티 코드가 들어갑니다. `map, filter, reduce, unique, groupBy, promise...` 함수형 유틸리티는 결국 어떤 것으로 귀결될까요? +- `src/use-rxjs` : 함수형 유틸리티 중 가장 유명한 RxJS를 직접 사용하고 적용해보면서 지금껏 공부해왔던, 사고해왔던 함수형 프로그래밍이 이런 패러다임이구나! 를 느끼는 경험을 가져가 보세요. + +
+ +## 🌟회차별 정리내용(슬랙 이미지) +### 📢 1주차 + +
+ + + + +
+ +
+ +### 📢 2주차 + +
+ + + + + +
+ +
+ +### 📢 3주차 + +
+ + + + +
+ +
+ +### 📢 4주차 + +
+ + + + + + + + + +

-## 🌟회차별 정리내용 -- 1주차 +### 📢 5주차 + +
+ + + + + + +
+ +
+ +> 관련 아티클 +- [자바스크립트는 왜 프로토타입을 선택했을까](https://medium.com/@limsungmook/%EC%9E%90%EB%B0%94%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%8A%B8%EB%8A%94-%EC%99%9C-%ED%94%84%EB%A1%9C%ED%86%A0%ED%83%80%EC%9E%85%EC%9D%84-%EC%84%A0%ED%83%9D%ED%96%88%EC%9D%84%EA%B9%8C-997f985adb42) +- [[개발인턴] script 언어와 type 언어](https://blog.barogo.io/%EA%B0%9C%EB%B0%9C%EC%9D%B8%ED%84%B4-script-%EC%96%B8%EC%96%B4%EC%99%80-type%EC%96%B8%EC%96%B4-96e037b35de0) +- [컴파일러와 인터프리터의 차이점 (비교 차트 포함) - 기술 - 2023](https://ko.surveillancepackages.com/difference-between-compiler-and-interpreter-2a62) +- [함수형 코딩 스터디를 해봅시다!](https://velog.io/@teo/functional-programming-study) +- [console.log 값을 비교할 수 있는 테스트 유틸 by Siny](https://github.com/solmin0302/FunctionalProgramming/pull/2/files#diff-b393fca7fe777ecd1f46de50b82777ae2402dc20a609c6ad4afe7744f8e350d2) + + + + + +- [1. 좋은 함수 만들기 - 부작용과 거리두기](https://jojoldu.tistory.com/697) + +
+ +### 📢 6주차 + +
+ + + + + + + +
+ +
+ +> 관련 아티클 +- [함수형 프로그래밍과 ES6+](https://www.youtube.com/watch?v=4sO0aWTd3yc) +- [[Javascript] 지연 평가(Lazy evaluation) 를 이용한 성능 개선](https://armadillo-dev.github.io/javascript/whit-is-lazy-evaluation/) +- [Iteration protocols - JavaScript | MDN](https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Iteration_protocols) +- [[제13회-3] 서비스에 함수형 / 동시성 적용사례](https://youtu.be/Y8d5P9M51xs) +- [marpple/FxTS](https://github.com/marpple/FxTS) +- [[FECrash] ChatGPT를 이용해서 뚝딱 만든 함수형 프로그래밍 5주차 복습 교재](https://velog.io/@teo/FECrash-ChatGPT%EB%A5%BC-%EC%9D%B4%EC%9A%A9%ED%95%B4%EC%84%[…]%B0%8D-5%EC%A3%BC%EC%B0%A8-%EB%B3%B5%EC%8A%B5-%EA%B5%90%EC%9E%AC) +- ["테오의 함수형 프로그래밍" 오픈채팅](https://open.kakao.com/o/gtb5620e) +- [Async code: From Vanilla JavaScript to Promises to async/await](https://medium.com/@linlinghao/async-code-from-vanilla-javascript-to-promises-to-async-await-fc440d9818dd) +- [Build a JavaScript Promise | Skilled.dev](https://skilled.dev/course/build-a-javascript-promise) +- [자바스크립트의 Promise 직접 구현하기](https://blog.hyunmin.dev/14) +- [Custom Promise 구현으로 프로미스 파혜치기](https://p-iknow.netlify.app/js/custom-promise) +- [[JS] 자바스크립트 Promise 객체 직접 구현해보기](https://velog.io/@turtle601/JS-%EC%9E%90%EB%B0%94%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%8A%B8-Promise-%EA%B0%9D%EC%B2%B4-%EC%A7%81%EC%A0%91-%EA%B5%AC%ED%98%84%ED%95%B4%EB%B3%B4%EA%B8%B0) + +
+ +### 📢 7주차 + +
+ + + + + +

\ No newline at end of file diff --git a/assets/1week-1.png b/assets/1week-1.png new file mode 100644 index 0000000..bcc7237 Binary files /dev/null and b/assets/1week-1.png differ diff --git a/assets/1week-2.png b/assets/1week-2.png new file mode 100644 index 0000000..9270a9a Binary files /dev/null and b/assets/1week-2.png differ diff --git a/assets/2week-1.png b/assets/2week-1.png new file mode 100644 index 0000000..26ce052 Binary files /dev/null and b/assets/2week-1.png differ diff --git a/assets/2week-2.png b/assets/2week-2.png new file mode 100644 index 0000000..8156a72 Binary files /dev/null and b/assets/2week-2.png differ diff --git a/assets/2week-3.png b/assets/2week-3.png new file mode 100644 index 0000000..3fb4f24 Binary files /dev/null and b/assets/2week-3.png differ diff --git a/assets/3week-1.png b/assets/3week-1.png new file mode 100644 index 0000000..651115f Binary files /dev/null and b/assets/3week-1.png differ diff --git a/assets/3week-2.png b/assets/3week-2.png new file mode 100644 index 0000000..2f77899 Binary files /dev/null and b/assets/3week-2.png differ diff --git a/assets/4week-1.png b/assets/4week-1.png new file mode 100644 index 0000000..96f18d1 Binary files /dev/null and b/assets/4week-1.png differ diff --git a/assets/4week-2.png b/assets/4week-2.png new file mode 100644 index 0000000..b1dd591 Binary files /dev/null and b/assets/4week-2.png differ diff --git a/assets/4week-3.png b/assets/4week-3.png new file mode 100644 index 0000000..ae8ca2f Binary files /dev/null and b/assets/4week-3.png differ diff --git a/assets/4week-4.png b/assets/4week-4.png new file mode 100644 index 0000000..d68ee13 Binary files /dev/null and b/assets/4week-4.png differ diff --git a/assets/4week-5.png b/assets/4week-5.png new file mode 100644 index 0000000..eb46bb8 Binary files /dev/null and b/assets/4week-5.png differ diff --git a/assets/4week-6.png b/assets/4week-6.png new file mode 100644 index 0000000..ac754fe Binary files /dev/null and b/assets/4week-6.png differ diff --git a/assets/4week-7.png b/assets/4week-7.png new file mode 100644 index 0000000..2b14221 Binary files /dev/null and b/assets/4week-7.png differ diff --git a/assets/5week-1.png b/assets/5week-1.png new file mode 100644 index 0000000..2b76dd7 Binary files /dev/null and b/assets/5week-1.png differ diff --git a/assets/5week-2.png b/assets/5week-2.png new file mode 100644 index 0000000..c70966c Binary files /dev/null and b/assets/5week-2.png differ diff --git a/assets/5week-3.png b/assets/5week-3.png new file mode 100644 index 0000000..7120883 Binary files /dev/null and b/assets/5week-3.png differ diff --git a/assets/5week-4.png b/assets/5week-4.png new file mode 100644 index 0000000..afe67f8 Binary files /dev/null and b/assets/5week-4.png differ diff --git a/assets/6week-1.png b/assets/6week-1.png new file mode 100644 index 0000000..05f577a Binary files /dev/null and b/assets/6week-1.png differ diff --git a/assets/6week-2.png b/assets/6week-2.png new file mode 100644 index 0000000..f195801 Binary files /dev/null and b/assets/6week-2.png differ diff --git a/assets/6week-3.png b/assets/6week-3.png new file mode 100644 index 0000000..a9c3d78 Binary files /dev/null and b/assets/6week-3.png differ diff --git a/assets/6week-4.png b/assets/6week-4.png new file mode 100644 index 0000000..f65c2da Binary files /dev/null and b/assets/6week-4.png differ diff --git a/assets/6week-5.png b/assets/6week-5.png new file mode 100644 index 0000000..f7a8133 Binary files /dev/null and b/assets/6week-5.png differ diff --git a/assets/7week-1.png b/assets/7week-1.png new file mode 100644 index 0000000..28ee2d4 Binary files /dev/null and b/assets/7week-1.png differ diff --git a/assets/7week-2.png b/assets/7week-2.png new file mode 100644 index 0000000..45fbc04 Binary files /dev/null and b/assets/7week-2.png differ diff --git a/assets/7week-3.png b/assets/7week-3.png new file mode 100644 index 0000000..3b28c90 Binary files /dev/null and b/assets/7week-3.png differ diff --git a/assets/study-1.jpg b/assets/study-1.jpg new file mode 100644 index 0000000..7c8d16e Binary files /dev/null and b/assets/study-1.jpg differ diff --git a/assets/study-2.jpg b/assets/study-2.jpg new file mode 100644 index 0000000..2d6a3c2 Binary files /dev/null and b/assets/study-2.jpg differ diff --git a/src/2week/LICENSE b/src/2week/LICENSE new file mode 100644 index 0000000..daa8198 --- /dev/null +++ b/src/2week/LICENSE @@ -0,0 +1,210 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +Copyright (c) 2022 by Mahmoud Elmahdi (https://codepen.io/elmahdim/pen/nrWXgX) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/src/2week/README.md b/src/2week/README.md new file mode 100644 index 0000000..e69de29 diff --git a/src/2week/app.js b/src/2week/app.js new file mode 100644 index 0000000..f20346a --- /dev/null +++ b/src/2week/app.js @@ -0,0 +1,68 @@ +var shopping_cart = []; +var shopping_cart_total = 0; + +document.querySelectorAll('button').forEach(button => + button.addEventListener('click', ({ target }) => { + const name = target.parentNode.querySelector('.menu-name').textContent; + const category = target.parentNode.querySelector('.category').textContent; + const price = target.parentNode.querySelector('.price').textContent; + + add_item_to_cart({ name, category, price }); + }), +); + +function add_item_to_cart(item) { + shopping_cart.push(item); + console.log(shopping_cart); + calc_cart_total(); +} + +function calc_cart_total() { + shopping_cart_total = 0; + for (var i = 0; i < shopping_cart.length; i++) { + var item = shopping_cart[i]; + shopping_cart_total += item.price; + } + set_cart_total_dom(); + update_shipping_icons(); + update_tax_dom(); +} + +function set_cart_total_dom() { + document.querySelector('.total-price').textContent = shopping_cart_total; +} + +function update_shipping_icons() { + var buy_buttons = get_buy_buttons_dom(); + for (var i = 0; i < buy_buttons.length; i++) { + var item = buy_buttons[i]; + console.log(item); + if (item.price + shopping_cart_total >= 20) item.show_free_shopping_icon(); + else item.hide_free_shopping_icon(); + } +} + +function get_buy_buttons_dom() { + var buttons = []; + + for (var i = 0; i < shopping_cart.length; i++) { + var item = shopping_cart[i]; + item.show_free_shopping_icon = function () { + console.log('DOM 의 아이콘을 보여줍니다'); + }; + item.hide_free_shopping_icon = function () { + console.log('DOM 의 아이콘을 숨깁니다'); + }; + buttons.push(item); + } + + return buttons; +} + +function update_tax_dom() { + set_tax_dom(shopping_cart_total * 0.1); +} + +function set_tax_dom(value) { + document.querySelector('.total-price').textContent = value; +} diff --git a/src/2week/assets/css/app.css b/src/2week/assets/css/app.css new file mode 100644 index 0000000..f95b45b --- /dev/null +++ b/src/2week/assets/css/app.css @@ -0,0 +1,114 @@ +* { + margin: 0; + padding: 0; +} + +body { + background-color: #F2EEE9; + font: normal 13px/1.5 Georgia, Serif; + color: #333; +} + +.wrapper { + width: 705px; + margin: 20px auto; + padding: 20px; +} + +.carts { + display: flex; + align-items: flex-end; + flex-direction: column; +} + +h1 { + display: inline-block; + background-color: #333; + color: #fff; + font-size: 20px; + font-weight: normal; + text-transform: uppercase; + padding: 4px 20px; + float: left; +} + +.clear { + clear: both; +} + +.items { + display: block; + margin: 20px 0; +} + +.item { + background-color: #fff; + float: left; + margin: 0 10px 10px 0; + width: 205px; + padding: 10px; + height: 310px; +} + +.item img { + display: block; + margin: auto; +} + +h2 { + font-size: 16px; + display: block; + border-bottom: 1px solid #ccc; + margin: 0 0 10px 0; + padding: 10px 0; +} + +button { + border: none; + border-radius: 8px; + padding: 4px 14px; + background-color: #00A29E; + color: #ffffff; + text-transform: uppercase; + float: right; + margin: 10px 0 5px; + font-weight: bold; + cursor: pointer; + transition: 0.2s ease-in-out; +} + +.icons:hover { + cursor: pointer; +} + +button:hover { + background-color: #00C6C2; +} + +button:active { + background-color: #005857; +} + +span { + float: right; +} + +.shopping-cart { + display: inline-block; + background: url('http://cdn1.iconfinder.com/data/icons/jigsoar-icons/24/_cart.png') no-repeat 0 0; + width: 24px; + height: 24px; + margin: 0 10px 0 0; +} + +.category { + border-radius: 8px; + background-color: #fff; + border: 1px solid #00A29E; + color: #00A29E; + padding: 6px; +} + +p, .price { + height: 20px; +} \ No newline at end of file diff --git a/src/2week/assets/css/reset.css b/src/2week/assets/css/reset.css new file mode 100644 index 0000000..a10d563 --- /dev/null +++ b/src/2week/assets/css/reset.css @@ -0,0 +1,54 @@ +/* http://meyerweb.com/eric/tools/css/reset/ + v2.0 | 20110126 + License: none (public domain) +*/ + +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td, +article, aside, canvas, details, embed, +figure, figcaption, footer, header, hgroup, +menu, nav, output, ruby, section, summary, +time, mark, audio, video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; +} + +/* HTML5 display-role reset for older browsers */ +article, aside, details, figcaption, figure, +footer, header, hgroup, menu, nav, section { + display: block; +} + +body { + line-height: 1; +} + +ol, ul { + list-style: none; +} + +blockquote, q { + quotes: none; +} + +blockquote:before, blockquote:after, +q:before, q:after { + content: ''; + content: none; +} + +table { + border-collapse: collapse; + border-spacing: 0; +} \ No newline at end of file diff --git "a/src/2week/assets/image/bread/\353\235\274\354\246\210\353\262\240\353\246\254_\354\207\274\354\275\234\353\235\274.jpeg" "b/src/2week/assets/image/bread/\353\235\274\354\246\210\353\262\240\353\246\254_\354\207\274\354\275\234\353\235\274.jpeg" new file mode 100644 index 0000000..4189dc5 Binary files /dev/null and "b/src/2week/assets/image/bread/\353\235\274\354\246\210\353\262\240\353\246\254_\354\207\274\354\275\234\353\235\274.jpeg" differ diff --git "a/src/2week/assets/image/bread/\355\201\264\353\236\230\354\213\235_\354\212\244\354\275\230.jpeg" "b/src/2week/assets/image/bread/\355\201\264\353\236\230\354\213\235_\354\212\244\354\275\230.jpeg" new file mode 100644 index 0000000..4dbf2b3 Binary files /dev/null and "b/src/2week/assets/image/bread/\355\201\264\353\236\230\354\213\235_\354\212\244\354\275\230.jpeg" differ diff --git "a/src/2week/assets/image/bread/\355\213\260\353\235\274\353\257\270\354\210\230_\355\201\254\353\246\274_\353\215\260\353\213\210\354\211\254.jpeg" "b/src/2week/assets/image/bread/\355\213\260\353\235\274\353\257\270\354\210\230_\355\201\254\353\246\274_\353\215\260\353\213\210\354\211\254.jpeg" new file mode 100644 index 0000000..800794b Binary files /dev/null and "b/src/2week/assets/image/bread/\355\213\260\353\235\274\353\257\270\354\210\230_\355\201\254\353\246\274_\353\215\260\353\213\210\354\211\254.jpeg" differ diff --git "a/src/2week/assets/image/coffee/\353\202\230\354\235\264\355\212\270\353\241\234_\353\260\224\353\213\220\353\235\274_\355\201\254\353\246\274.jpeg" "b/src/2week/assets/image/coffee/\353\202\230\354\235\264\355\212\270\353\241\234_\353\260\224\353\213\220\353\235\274_\355\201\254\353\246\274.jpeg" new file mode 100644 index 0000000..08fc193 Binary files /dev/null and "b/src/2week/assets/image/coffee/\353\202\230\354\235\264\355\212\270\353\241\234_\353\260\224\353\213\220\353\235\274_\355\201\254\353\246\274.jpeg" differ diff --git "a/src/2week/assets/image/coffee/\353\202\230\354\235\264\355\212\270\353\241\234_\354\275\234\353\223\234_\353\270\214\353\243\250.jpeg" "b/src/2week/assets/image/coffee/\353\202\230\354\235\264\355\212\270\353\241\234_\354\275\234\353\223\234_\353\270\214\353\243\250.jpeg" new file mode 100644 index 0000000..24fd135 Binary files /dev/null and "b/src/2week/assets/image/coffee/\353\202\230\354\235\264\355\212\270\353\241\234_\354\275\234\353\223\234_\353\270\214\353\243\250.jpeg" differ diff --git "a/src/2week/assets/image/coffee/\353\217\214\354\262\264_\354\275\234\353\223\234_\353\270\214\353\243\250.jpeg" "b/src/2week/assets/image/coffee/\353\217\214\354\262\264_\354\275\234\353\223\234_\353\270\214\353\243\250.jpeg" new file mode 100644 index 0000000..edc7308 Binary files /dev/null and "b/src/2week/assets/image/coffee/\353\217\214\354\262\264_\354\275\234\353\223\234_\353\270\214\353\243\250.jpeg" differ diff --git "a/src/2week/assets/image/coffee/\353\257\274\355\212\270_\354\275\234\353\223\234_\353\270\214\353\243\250.jpeg" "b/src/2week/assets/image/coffee/\353\257\274\355\212\270_\354\275\234\353\223\234_\353\270\214\353\243\250.jpeg" new file mode 100644 index 0000000..f865af7 Binary files /dev/null and "b/src/2week/assets/image/coffee/\353\257\274\355\212\270_\354\275\234\353\223\234_\353\270\214\353\243\250.jpeg" differ diff --git "a/src/2week/assets/image/coffee/\353\260\224\353\213\220\353\235\274_\355\201\254\353\246\274_\354\275\234\353\223\234_\353\270\214\353\243\250.jpeg" "b/src/2week/assets/image/coffee/\353\260\224\353\213\220\353\235\274_\355\201\254\353\246\274_\354\275\234\353\223\234_\353\270\214\353\243\250.jpeg" new file mode 100644 index 0000000..0f7f994 Binary files /dev/null and "b/src/2week/assets/image/coffee/\353\260\224\353\213\220\353\235\274_\355\201\254\353\246\274_\354\275\234\353\223\234_\353\270\214\353\243\250.jpeg" differ diff --git "a/src/2week/assets/image/coffee/\354\225\204\354\235\264\354\212\244_\355\206\240\355\224\274\353\204\233_\353\235\274\353\226\274.jpeg" "b/src/2week/assets/image/coffee/\354\225\204\354\235\264\354\212\244_\355\206\240\355\224\274\353\204\233_\353\235\274\353\226\274.jpeg" new file mode 100644 index 0000000..eb4d053 Binary files /dev/null and "b/src/2week/assets/image/coffee/\354\225\204\354\235\264\354\212\244_\355\206\240\355\224\274\353\204\233_\353\235\274\353\226\274.jpeg" differ diff --git "a/src/2week/assets/image/coffee/\354\230\244\353\212\230\354\235\230_\354\273\244\355\224\274.jpeg" "b/src/2week/assets/image/coffee/\354\230\244\353\212\230\354\235\230_\354\273\244\355\224\274.jpeg" new file mode 100644 index 0000000..e95c923 Binary files /dev/null and "b/src/2week/assets/image/coffee/\354\230\244\353\212\230\354\235\230_\354\273\244\355\224\274.jpeg" differ diff --git "a/src/2week/assets/image/coffee/\354\236\220\353\260\224_\354\271\251_\355\224\204\353\235\274\355\221\270\354\271\230\353\205\270.jpeg" "b/src/2week/assets/image/coffee/\354\236\220\353\260\224_\354\271\251_\355\224\204\353\235\274\355\221\270\354\271\230\353\205\270.jpeg" new file mode 100644 index 0000000..8fadda0 Binary files /dev/null and "b/src/2week/assets/image/coffee/\354\236\220\353\260\224_\354\271\251_\355\224\204\353\235\274\355\221\270\354\271\230\353\205\270.jpeg" differ diff --git "a/src/2week/assets/image/coffee/\354\240\234\354\243\274_\353\271\204\354\240\200\353\247\201_\354\275\234\353\223\234_\353\270\214\353\243\250.jpeg" "b/src/2week/assets/image/coffee/\354\240\234\354\243\274_\353\271\204\354\240\200\353\247\201_\354\275\234\353\223\234_\353\270\214\353\243\250.jpeg" new file mode 100644 index 0000000..b905c70 Binary files /dev/null and "b/src/2week/assets/image/coffee/\354\240\234\354\243\274_\353\271\204\354\240\200\353\247\201_\354\275\234\353\223\234_\353\270\214\353\243\250.jpeg" differ diff --git a/src/2week/assets/image/svg/payment.svg b/src/2week/assets/image/svg/payment.svg new file mode 100644 index 0000000..61929f4 --- /dev/null +++ b/src/2week/assets/image/svg/payment.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/2week/cypress.config.js b/src/2week/cypress.config.js new file mode 100644 index 0000000..87724b8 --- /dev/null +++ b/src/2week/cypress.config.js @@ -0,0 +1,8 @@ +const { defineConfig } = require('cypress'); + +module.exports = defineConfig({ + e2e: { + screenshotOnRunFailure: false, + video: false, + }, +}); diff --git a/src/2week/cypress/e2e/app.cy.js b/src/2week/cypress/e2e/app.cy.js new file mode 100644 index 0000000..0cb2e61 --- /dev/null +++ b/src/2week/cypress/e2e/app.cy.js @@ -0,0 +1,14 @@ +describe('FECrash 카페', () => { + beforeEach(() => { + cy.visit({ + url: 'http://localhost:5500/src/2week', + method: 'GET', + }); + }); + + context('최초 렌더링 시', () => { + it('장바구니 총 가격은 0원이어야 한다.', () => { + cy.get('.total-price').should('have.text', '0원'); + }); + }); +}); diff --git a/src/2week/cypress/fixtures/example.json b/src/2week/cypress/fixtures/example.json new file mode 100644 index 0000000..da18d93 --- /dev/null +++ b/src/2week/cypress/fixtures/example.json @@ -0,0 +1,5 @@ +{ + "name": "Using fixtures to represent data", + "email": "hello@cypress.io", + "body": "Fixtures are a great way to mock data for responses to routes" +} \ No newline at end of file diff --git a/src/2week/cypress/support/commands.js b/src/2week/cypress/support/commands.js new file mode 100644 index 0000000..119ab03 --- /dev/null +++ b/src/2week/cypress/support/commands.js @@ -0,0 +1,25 @@ +// *********************************************** +// This example commands.js shows you how to +// create various custom commands and overwrite +// existing commands. +// +// For more comprehensive examples of custom +// commands please read more here: +// https://on.cypress.io/custom-commands +// *********************************************** +// +// +// -- This is a parent command -- +// Cypress.Commands.add('login', (email, password) => { ... }) +// +// +// -- This is a child command -- +// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) +// +// +// -- This is a dual command -- +// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) +// +// +// -- This will overwrite an existing command -- +// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) diff --git a/src/2week/cypress/support/e2e.js b/src/2week/cypress/support/e2e.js new file mode 100644 index 0000000..5df9c01 --- /dev/null +++ b/src/2week/cypress/support/e2e.js @@ -0,0 +1,20 @@ +// *********************************************************** +// This example support/e2e.js is processed and +// loaded automatically before your test files. +// +// This is a great place to put global configuration and +// behavior that modifies Cypress. +// +// You can change the location of this file or turn off +// automatically serving support files with the +// 'supportFile' configuration option. +// +// You can read more here: +// https://on.cypress.io/configuration +// *********************************************************** + +// Import commands.js using ES2015 syntax: +import './commands'; + +// Alternatively you can use CommonJS syntax: +// require('./commands') diff --git a/src/2week/index.html b/src/2week/index.html new file mode 100644 index 0000000..c4111e9 --- /dev/null +++ b/src/2week/index.html @@ -0,0 +1,122 @@ + + + + + + + + FECrash 카페 + + + + + +
+

FECrash 카페

+
+ + 0원 +
+ +
+
+
+ item +

C오늘의 커피

+

가격: 1,000원

+ +
+
+ item +

C나이트로 바닐라 크림

+ +

가격: 3,500원 +

+ +
+
+ item +

C나이트로 콜드 브루

+ +

가격: 4,000원 +

+ +
+
+ item +

C돌체 콜드 브루

+ +

가격: 3,900원 +

+ +
+
+ item +

C자바 칩 프라푸치노

+ +

가격: 5,200원 +

+ +
+
+ item +

C민트 콜드 브루

+ +

가격: 4,800원 +

+ +
+
+ item +

C바닐라 크림 콜드 브루

+ +

가격: 4,300원 +

+ +
+
+ item +

C아이스 토피넛 라떼

+ +

가격: 5,500원 +

+ +
+
+ item +

C제주 비저링 콜드 브루

+ +

가격: 6,000원 +

+ +
+
+ item +

B라즈베리 쇼콜라

+ +

가격: 7,000원 +

+ +
+
+ item +

B클래식 스콘

+ +

가격: 3,300원 +

+ +
+
+ item +

B티라미수 크림 데니쉬

+ +

가격: 7,200원 +

+ +
+
+
+ + + + \ No newline at end of file diff --git a/src/2week/package.json b/src/2week/package.json new file mode 100644 index 0000000..4dbfc2b --- /dev/null +++ b/src/2week/package.json @@ -0,0 +1,12 @@ +{ + "name": "fecrash-cafe", + "version": "1.0.0", + "main": "app.js", + "license": "MIT", + "scripts": { + "test": "cypress run --browser chrome" + }, + "devDependencies": { + "cypress": "^12.1.0" + } +} diff --git a/src/2week/yarn.lock b/src/2week/yarn.lock new file mode 100644 index 0000000..d4dc2d4 --- /dev/null +++ b/src/2week/yarn.lock @@ -0,0 +1,1126 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@colors/colors@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" + integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== + +"@cypress/request@^2.88.10": + version "2.88.10" + resolved "https://registry.yarnpkg.com/@cypress/request/-/request-2.88.10.tgz#b66d76b07f860d3a4b8d7a0604d020c662752cce" + integrity sha512-Zp7F+R93N0yZyG34GutyTNr+okam7s/Fzc1+i3kcqOP8vk6OuajuE9qZJ6Rs+10/1JFtXFYMdyarnU1rZuJesg== + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" + forever-agent "~0.6.1" + form-data "~2.3.2" + http-signature "~1.3.6" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.19" + performance-now "^2.1.0" + qs "~6.5.2" + safe-buffer "^5.1.2" + tough-cookie "~2.5.0" + tunnel-agent "^0.6.0" + uuid "^8.3.2" + +"@cypress/xvfb@^1.2.4": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@cypress/xvfb/-/xvfb-1.2.4.tgz#2daf42e8275b39f4aa53c14214e557bd14e7748a" + integrity sha512-skbBzPggOVYCbnGgV+0dmBdW/s77ZkAOXIC1knS8NagwDjBrNC1LuXtQJeiN6l+m7lzmHtaoUw/ctJKdqkG57Q== + dependencies: + debug "^3.1.0" + lodash.once "^4.1.1" + +"@types/node@*": + version "18.11.15" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.15.tgz#de0e1fbd2b22b962d45971431e2ae696643d3f5d" + integrity sha512-VkhBbVo2+2oozlkdHXLrb3zjsRkpdnaU2bXmX8Wgle3PUi569eLRaHGlgETQHR7lLL1w7GiG3h9SnePhxNDecw== + +"@types/node@^14.14.31": + version "14.18.34" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.34.tgz#cd2e6fa0dbfb08a62582a7b967558e73c32061ec" + integrity sha512-hcU9AIQVHmPnmjRK+XUUYlILlr9pQrsqSrwov/JK1pnf3GTQowVBhx54FbvM0AU/VXGH4i3+vgXS5EguR7fysA== + +"@types/sinonjs__fake-timers@8.1.1": + version "8.1.1" + resolved "https://registry.yarnpkg.com/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.1.tgz#b49c2c70150141a15e0fa7e79cf1f92a72934ce3" + integrity sha512-0kSuKjAS0TrGLJ0M/+8MaFkGsQhZpB6pxOmvS3K8FYI72K//YmdfoW9X2qPsAKh1mkwxGD5zib9s1FIFed6E8g== + +"@types/sizzle@^2.3.2": + version "2.3.3" + resolved "https://registry.yarnpkg.com/@types/sizzle/-/sizzle-2.3.3.tgz#ff5e2f1902969d305225a047c8a0fd5c915cebef" + integrity sha512-JYM8x9EGF163bEyhdJBpR2QX1R5naCJHC8ucJylJ3w9/CVBaskdQ8WqBf8MmQrd1kRvp/a4TS8HJ+bxzR7ZJYQ== + +"@types/yauzl@^2.9.1": + version "2.10.0" + resolved "https://registry.yarnpkg.com/@types/yauzl/-/yauzl-2.10.0.tgz#b3248295276cf8c6f153ebe6a9aba0c988cb2599" + integrity sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw== + dependencies: + "@types/node" "*" + +aggregate-error@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" + integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== + dependencies: + clean-stack "^2.0.0" + indent-string "^4.0.0" + +ansi-colors@^4.1.1: + version "4.1.3" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" + integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== + +ansi-escapes@^4.3.0: + version "4.3.2" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== + dependencies: + type-fest "^0.21.3" + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +arch@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/arch/-/arch-2.2.0.tgz#1bc47818f305764f23ab3306b0bfc086c5a29d11" + integrity sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ== + +asn1@~0.2.3: + version "0.2.6" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.6.tgz#0d3a7bb6e64e02a90c0303b31f292868ea09a08d" + integrity sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ== + dependencies: + safer-buffer "~2.1.0" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + integrity sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw== + +astral-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" + integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== + +async@^3.2.0: + version "3.2.4" + resolved "https://registry.yarnpkg.com/async/-/async-3.2.4.tgz#2d22e00f8cddeb5fde5dd33522b56d1cf569a81c" + integrity sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ== + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== + +at-least-node@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" + integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== + +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + integrity sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA== + +aws4@^1.8.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" + integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + +bcrypt-pbkdf@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + integrity sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w== + dependencies: + tweetnacl "^0.14.3" + +blob-util@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/blob-util/-/blob-util-2.0.2.tgz#3b4e3c281111bb7f11128518006cdc60b403a1eb" + integrity sha512-T7JQa+zsXXEa6/8ZhHcQEW1UFfVM49Ts65uBkFL6fz2QmrElqmbajIDJvuA0tEhRe5eIjpV9ZF+0RfZR9voJFQ== + +bluebird@^3.7.2: + version "3.7.2" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" + integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +buffer-crc32@~0.2.3: + version "0.2.13" + resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" + integrity sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ== + +buffer@^5.6.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" + integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.1.13" + +cachedir@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/cachedir/-/cachedir-2.3.0.tgz#0c75892a052198f0b21c7c1804d8331edfcae0e8" + integrity sha512-A+Fezp4zxnit6FanDmv9EqXNAi3vt9DWp51/71UEhXukb7QUuvtv9344h91dyAxuTLoSYJFU299qzR3tzwPAhw== + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw== + +chalk@^4.1.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +check-more-types@^2.24.0: + version "2.24.0" + resolved "https://registry.yarnpkg.com/check-more-types/-/check-more-types-2.24.0.tgz#1420ffb10fd444dcfc79b43891bbfffd32a84600" + integrity sha512-Pj779qHxV2tuapviy1bSZNEL1maXr13bPYpsvSDB68HlYcYuhlDrmGd63i0JHMCLKzc7rUSNIrpdJlhVlNwrxA== + +ci-info@^3.2.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.7.0.tgz#6d01b3696c59915b6ce057e4aa4adfc2fa25f5ef" + integrity sha512-2CpRNYmImPx+RXKLq6jko/L07phmS9I02TyqkcNU20GCF/GgaWvc58hPtjxDX8lPpkdwc9sNh72V9k00S7ezog== + +clean-stack@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" + integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== + +cli-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" + integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== + dependencies: + restore-cursor "^3.1.0" + +cli-table3@~0.6.1: + version "0.6.3" + resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.6.3.tgz#61ab765aac156b52f222954ffc607a6f01dbeeb2" + integrity sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg== + dependencies: + string-width "^4.2.0" + optionalDependencies: + "@colors/colors" "1.5.0" + +cli-truncate@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-2.1.0.tgz#c39e28bf05edcde5be3b98992a22deed5a2b93c7" + integrity sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg== + dependencies: + slice-ansi "^3.0.0" + string-width "^4.2.0" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +colorette@^2.0.16: + version "2.0.19" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.19.tgz#cdf044f47ad41a0f4b56b3a0d5b4e6e1a2d5a798" + integrity sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ== + +combined-stream@^1.0.6, combined-stream@~1.0.6: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + +commander@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae" + integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg== + +common-tags@^1.8.0: + version "1.8.2" + resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.8.2.tgz#94ebb3c076d26032745fd54face7f688ef5ac9c6" + integrity sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +core-util-is@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ== + +cross-spawn@^7.0.0: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +cypress@^12.1.0: + version "12.1.0" + resolved "https://registry.yarnpkg.com/cypress/-/cypress-12.1.0.tgz#1fdaa631bc30df466dc9505154616f4cf69dbd4b" + integrity sha512-7fz8N84uhN1+ePNDsfQvoWEl4P3/VGKKmAg+bJQFY4onhA37Ys+6oBkGbNdwGeC7n2QqibNVPhk8x3YuQLwzfw== + dependencies: + "@cypress/request" "^2.88.10" + "@cypress/xvfb" "^1.2.4" + "@types/node" "^14.14.31" + "@types/sinonjs__fake-timers" "8.1.1" + "@types/sizzle" "^2.3.2" + arch "^2.2.0" + blob-util "^2.0.2" + bluebird "^3.7.2" + buffer "^5.6.0" + cachedir "^2.3.0" + chalk "^4.1.0" + check-more-types "^2.24.0" + cli-cursor "^3.1.0" + cli-table3 "~0.6.1" + commander "^5.1.0" + common-tags "^1.8.0" + dayjs "^1.10.4" + debug "^4.3.2" + enquirer "^2.3.6" + eventemitter2 "6.4.7" + execa "4.1.0" + executable "^4.1.1" + extract-zip "2.0.1" + figures "^3.2.0" + fs-extra "^9.1.0" + getos "^3.2.1" + is-ci "^3.0.0" + is-installed-globally "~0.4.0" + lazy-ass "^1.6.0" + listr2 "^3.8.3" + lodash "^4.17.21" + log-symbols "^4.0.0" + minimist "^1.2.6" + ospath "^1.2.2" + pretty-bytes "^5.6.0" + proxy-from-env "1.0.0" + request-progress "^3.0.0" + semver "^7.3.2" + supports-color "^8.1.1" + tmp "~0.2.1" + untildify "^4.0.0" + yauzl "^2.10.0" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + integrity sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g== + dependencies: + assert-plus "^1.0.0" + +dayjs@^1.10.4: + version "1.11.7" + resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.7.tgz#4b296922642f70999544d1144a2c25730fce63e2" + integrity sha512-+Yw9U6YO5TQohxLcIkrXBeY73WP3ejHWVvx8XCk3gxvQDCTEmS48ZrSZCKciI7Bhl/uCMyxYtE9UqRILmFphkQ== + +debug@^3.1.0: + version "3.2.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== + dependencies: + ms "^2.1.1" + +debug@^4.1.1, debug@^4.3.2: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== + +ecc-jsbn@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + integrity sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw== + dependencies: + jsbn "~0.1.0" + safer-buffer "^2.1.0" + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +end-of-stream@^1.1.0: + version "1.4.4" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== + dependencies: + once "^1.4.0" + +enquirer@^2.3.6: + version "2.3.6" + resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" + integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== + dependencies: + ansi-colors "^4.1.1" + +escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== + +eventemitter2@6.4.7: + version "6.4.7" + resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-6.4.7.tgz#a7f6c4d7abf28a14c1ef3442f21cb306a054271d" + integrity sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg== + +execa@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a" + integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA== + dependencies: + cross-spawn "^7.0.0" + get-stream "^5.0.0" + human-signals "^1.1.1" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.0" + onetime "^5.1.0" + signal-exit "^3.0.2" + strip-final-newline "^2.0.0" + +executable@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/executable/-/executable-4.1.1.tgz#41532bff361d3e57af4d763b70582db18f5d133c" + integrity sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg== + dependencies: + pify "^2.2.0" + +extend@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== + +extract-zip@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-2.0.1.tgz#663dca56fe46df890d5f131ef4a06d22bb8ba13a" + integrity sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg== + dependencies: + debug "^4.1.1" + get-stream "^5.1.0" + yauzl "^2.10.0" + optionalDependencies: + "@types/yauzl" "^2.9.1" + +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + integrity sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g== + +extsprintf@^1.2.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.1.tgz#8d172c064867f235c0c84a596806d279bf4bcc07" + integrity sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA== + +fd-slicer@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" + integrity sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g== + dependencies: + pend "~1.2.0" + +figures@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" + integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== + dependencies: + escape-string-regexp "^1.0.5" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + integrity sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw== + +form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + +fs-extra@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" + integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== + dependencies: + at-least-node "^1.0.0" + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +get-stream@^5.0.0, get-stream@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" + integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== + dependencies: + pump "^3.0.0" + +getos@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/getos/-/getos-3.2.1.tgz#0134d1f4e00eb46144c5a9c0ac4dc087cbb27dc5" + integrity sha512-U56CfOK17OKgTVqozZjUKNdkfEv6jk5WISBJ8SHoagjE6L69zOwl3Z+O8myjY9MEW3i2HPWQBt/LTbCgcC973Q== + dependencies: + async "^3.2.0" + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + integrity sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng== + dependencies: + assert-plus "^1.0.0" + +glob@^7.1.3: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +global-dirs@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-3.0.1.tgz#0c488971f066baceda21447aecb1a8b911d22485" + integrity sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA== + dependencies: + ini "2.0.0" + +graceful-fs@^4.1.6, graceful-fs@^4.2.0: + version "4.2.10" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" + integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +http-signature@~1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.3.6.tgz#cb6fbfdf86d1c974f343be94e87f7fc128662cf9" + integrity sha512-3adrsD6zqo4GsTqtO7FyrejHNv+NgiIfAfv68+jVlFmSr9OGy7zrxONceFRLKvnnZA5jbxQBX1u9PpB6Wi32Gw== + dependencies: + assert-plus "^1.0.0" + jsprim "^2.0.2" + sshpk "^1.14.1" + +human-signals@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" + integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== + +ieee754@^1.1.13: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== + +indent-string@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" + integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +ini@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ini/-/ini-2.0.0.tgz#e5fd556ecdd5726be978fa1001862eacb0a94bc5" + integrity sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA== + +is-ci@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-3.0.1.tgz#db6ecbed1bd659c43dac0f45661e7674103d1867" + integrity sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ== + dependencies: + ci-info "^3.2.0" + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-installed-globally@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.4.0.tgz#9a0fd407949c30f86eb6959ef1b7994ed0b7b520" + integrity sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ== + dependencies: + global-dirs "^3.0.0" + is-path-inside "^3.0.2" + +is-path-inside@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" + integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== + +is-stream@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + integrity sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA== + +is-unicode-supported@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" + integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + integrity sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g== + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + integrity sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg== + +json-schema@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5" + integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== + +jsonfile@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== + dependencies: + universalify "^2.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + +jsprim@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-2.0.2.tgz#77ca23dbcd4135cd364800d22ff82c2185803d4d" + integrity sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ== + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.4.0" + verror "1.10.0" + +lazy-ass@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/lazy-ass/-/lazy-ass-1.6.0.tgz#7999655e8646c17f089fdd187d150d3324d54513" + integrity sha512-cc8oEVoctTvsFZ/Oje/kGnHbpWHYBe8IAJe4C0QNc3t8uM/0Y8+erSz/7Y1ALuXTEZTMvxXwO6YbX1ey3ujiZw== + +listr2@^3.8.3: + version "3.14.0" + resolved "https://registry.yarnpkg.com/listr2/-/listr2-3.14.0.tgz#23101cc62e1375fd5836b248276d1d2b51fdbe9e" + integrity sha512-TyWI8G99GX9GjE54cJ+RrNMcIFBfwMPxc3XTFiAYGN4s10hWROGtOg7+O6u6LE3mNkyld7RSLE6nrKBvTfcs3g== + dependencies: + cli-truncate "^2.1.0" + colorette "^2.0.16" + log-update "^4.0.0" + p-map "^4.0.0" + rfdc "^1.3.0" + rxjs "^7.5.1" + through "^2.3.8" + wrap-ansi "^7.0.0" + +lodash.once@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" + integrity sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg== + +lodash@^4.17.21: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +log-symbols@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" + integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== + dependencies: + chalk "^4.1.0" + is-unicode-supported "^0.1.0" + +log-update@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/log-update/-/log-update-4.0.0.tgz#589ecd352471f2a1c0c570287543a64dfd20e0a1" + integrity sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg== + dependencies: + ansi-escapes "^4.3.0" + cli-cursor "^3.1.0" + slice-ansi "^4.0.0" + wrap-ansi "^6.2.0" + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + +mime-types@^2.1.12, mime-types@~2.1.19: + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + +mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + +minimatch@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +minimist@^1.2.6: + version "1.2.7" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18" + integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g== + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +ms@^2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +npm-run-path@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== + dependencies: + path-key "^3.0.0" + +once@^1.3.0, once@^1.3.1, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +onetime@^5.1.0: + version "5.1.2" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== + dependencies: + mimic-fn "^2.1.0" + +ospath@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/ospath/-/ospath-1.2.2.tgz#1276639774a3f8ef2572f7fe4280e0ea4550c07b" + integrity sha512-o6E5qJV5zkAbIDNhGSIlyOhScKXgQrSRMilfph0clDfM0nEnBOlKlH4sWDmG95BW/CvwNz0vmm7dJVtU2KlMiA== + +p-map@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" + integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== + dependencies: + aggregate-error "^3.0.0" + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +path-key@^3.0.0, path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +pend@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" + integrity sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg== + +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow== + +pify@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + integrity sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog== + +pretty-bytes@^5.6.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.6.0.tgz#356256f643804773c82f64723fe78c92c62beaeb" + integrity sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg== + +proxy-from-env@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.0.0.tgz#33c50398f70ea7eb96d21f7b817630a55791c7ee" + integrity sha512-F2JHgJQ1iqwnHDcQjVBsq3n/uoaFL+iPW/eAeL7kVxy/2RrWaN4WroKjjvbsoRtv0ftelNyC01bjRhn/bhcf4A== + +psl@^1.1.28: + version "1.9.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" + integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== + +pump@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +punycode@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + +qs@~6.5.2: + version "6.5.3" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" + integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA== + +request-progress@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/request-progress/-/request-progress-3.0.0.tgz#4ca754081c7fec63f505e4faa825aa06cd669dbe" + integrity sha512-MnWzEHHaxHO2iWiQuHrUPBi/1WeBf5PkxQqNyNvLl9VAYSdXkP8tQ3pBSeCPD+yw0v0Aq1zosWLz0BdeXpWwZg== + dependencies: + throttleit "^1.0.0" + +restore-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" + integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== + dependencies: + onetime "^5.1.0" + signal-exit "^3.0.2" + +rfdc@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.0.tgz#d0b7c441ab2720d05dc4cf26e01c89631d9da08b" + integrity sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA== + +rimraf@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + +rxjs@^7.5.1: + version "7.6.0" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.6.0.tgz#361da5362b6ddaa691a2de0b4f2d32028f1eb5a2" + integrity sha512-DDa7d8TFNUalGC9VqXvQ1euWNN7sc63TrUCuM9J998+ViviahMIjKSOU7rfcgFOF+FCD71BhDRv4hrFz+ImDLQ== + dependencies: + tslib "^2.1.0" + +safe-buffer@^5.0.1, safe-buffer@^5.1.2: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +semver@^7.3.2: + version "7.3.8" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" + integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== + dependencies: + lru-cache "^6.0.0" + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +signal-exit@^3.0.2: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + +slice-ansi@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-3.0.0.tgz#31ddc10930a1b7e0b67b08c96c2f49b77a789787" + integrity sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ== + dependencies: + ansi-styles "^4.0.0" + astral-regex "^2.0.0" + is-fullwidth-code-point "^3.0.0" + +slice-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" + integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== + dependencies: + ansi-styles "^4.0.0" + astral-regex "^2.0.0" + is-fullwidth-code-point "^3.0.0" + +sshpk@^1.14.1: + version "1.17.0" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.17.0.tgz#578082d92d4fe612b13007496e543fa0fbcbe4c5" + integrity sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ== + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" + ecc-jsbn "~0.1.1" + getpass "^0.1.1" + jsbn "~0.1.0" + safer-buffer "^2.0.2" + tweetnacl "~0.14.0" + +string-width@^4.1.0, string-width@^4.2.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-final-newline@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +supports-color@^8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + +throttleit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-1.0.0.tgz#9e785836daf46743145a5984b6268d828528ac6c" + integrity sha512-rkTVqu6IjfQ/6+uNuuc3sZek4CEYxTJom3IktzgdSxcZqdARuebbA/f4QmAxMQIxqq9ZLEUkSYqvuk1I6VKq4g== + +through@^2.3.8: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== + +tmp@~0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.1.tgz#8457fc3037dcf4719c251367a1af6500ee1ccf14" + integrity sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ== + dependencies: + rimraf "^3.0.0" + +tough-cookie@~2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== + dependencies: + psl "^1.1.28" + punycode "^2.1.1" + +tslib@^2.1.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.1.tgz#0d0bfbaac2880b91e22df0768e55be9753a5b17e" + integrity sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA== + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w== + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + integrity sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA== + +type-fest@^0.21.3: + version "0.21.3" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== + +universalify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" + integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== + +untildify@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/untildify/-/untildify-4.0.0.tgz#2bc947b953652487e4600949fb091e3ae8cd919b" + integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw== + +uuid@^8.3.2: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + integrity sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw== + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +wrap-ansi@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" + integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yauzl@^2.10.0: + version "2.10.0" + resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" + integrity sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g== + dependencies: + buffer-crc32 "~0.2.3" + fd-slicer "~1.1.0" diff --git a/src/make-your-package/.gitignore b/src/make-your-package/.gitignore new file mode 100644 index 0000000..adb2c19 --- /dev/null +++ b/src/make-your-package/.gitignore @@ -0,0 +1,103 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# TypeScript v1 declaration files +typings/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env +.env.test + +# parcel-bundler cache (https://parceljs.org/) +.cache + +# Next.js build output +.next + +# Nuxt.js build / generate output +.nuxt + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and *not* Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port diff --git a/src/make-your-package/LICENSE b/src/make-your-package/LICENSE new file mode 100644 index 0000000..cacb881 --- /dev/null +++ b/src/make-your-package/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 InSeong-So + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/src/make-your-package/index.js b/src/make-your-package/index.js new file mode 100644 index 0000000..190c3bc --- /dev/null +++ b/src/make-your-package/index.js @@ -0,0 +1 @@ +// 여기에 자신의 패키지를 작성할 거에요! diff --git a/src/make-your-package/package.json b/src/make-your-package/package.json new file mode 100644 index 0000000..da82178 --- /dev/null +++ b/src/make-your-package/package.json @@ -0,0 +1,16 @@ +{ + "name": "parang-utils", + "version": "0.0.1", + "main": "./index.js", + "author": "FECrash", + "license": "ISC", + "homepage": "https://github.com/FECrash/FunctionalProgramming#readme", + "bugs": "https://github.com/FECrash/FunctionalProgramming#readme", + "repository": { + "type": "git", + "url": "git+https://github.com/FECrash/FunctionalProgramming.git" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/" + } +} diff --git a/src/refactoring/example-1.js b/src/refactoring/example-1.js new file mode 100644 index 0000000..5b9fc78 --- /dev/null +++ b/src/refactoring/example-1.js @@ -0,0 +1,33 @@ +function setPriceByName(cart, name, price) { + var item = cart[name]; + var newItem = objectSet(item, 'price', price); + var newCart = objectSet(cart, name, newItem); + return newCart; +} + +function setShippingByName(cart, name, ship) { + var item = cart[name]; + var newItem = objectSet(item, 'shipping', ship); + var newCart = objectSet(cart, name, newItem); + return newCart; +} + +function setQuantityByName(cart, name, quant) { + var item = cart[name]; + var newItem = objectSet(item, 'quantity', quant); + var newCart = objectSet(cart, name, newItem); + return newCart; +} + +function setTaxByName(cart, name, tax) { + var item = cart[name]; + var newItem = objectSet(item, 'tax', tax); + var newCart = objectSet(cart, name, newItem); + return newCart; +} + +function objectSet(object, key, value) { + var copy = Object.assign({}, object); + copy[key] = value; + return copy; +} \ No newline at end of file diff --git a/src/refactoring/example-2.js b/src/refactoring/example-2.js new file mode 100644 index 0000000..4633cc7 --- /dev/null +++ b/src/refactoring/example-2.js @@ -0,0 +1,12 @@ +for (var i = 0; i < foods.length; i++) { + var food = foods[i]; + cook(food); + eat(food); +} + +for (var i = 0; i < dishes.length; i++) { + var dish = dishes[i]; + wash(dish); + dry(dish); + putAway(dish); +} diff --git a/src/refactoring/example-3.js b/src/refactoring/example-3.js new file mode 100644 index 0000000..7a556e8 --- /dev/null +++ b/src/refactoring/example-3.js @@ -0,0 +1,15 @@ +var user = { + id: '1', +}; + +async function getUserData({ id }) { + const response = await fetch(`https://jsonplaceholder.typicode.com/users?id=${id}`); +} + +var logToSnapErrors = error => console.log(`🚫 에러가 발생했어요: ${error.message}`); + +try { + getUserData(user); +} catch (error) { + logToSnapErrors(error); +} diff --git a/src/refactoring/herb/example-1.js b/src/refactoring/herb/example-1.js new file mode 100644 index 0000000..5830e4a --- /dev/null +++ b/src/refactoring/herb/example-1.js @@ -0,0 +1,45 @@ +function setPriceByName(cart, name, price) { + var item = cart[name]; + var newItem = objectSet(item, 'price', price); + var newCart = objectSet(cart, name, newItem); + return newCart; +} + +function setShippingByName(cart, name, ship) { + var item = cart[name]; + var newItem = objectSet(item, 'shipping', ship); + var newCart = objectSet(cart, name, newItem); + return newCart; +} + +function setQuantityByName(cart, name, quant) { + var item = cart[name]; + var newItem = objectSet(item, 'quantity', quant); + var newCart = objectSet(cart, name, newItem); + return newCart; +} + +function setTaxByName(cart, name, tax) { + var item = cart[name]; + var newItem = objectSet(item, 'tax', tax); + var newCart = objectSet(cart, name, newItem); + return newCart; +} + +function objectSet(object, key, value) { + var copy = Object.assign({}, object); + copy[key] = value; + return copy; +} + +// setByName이라는 함수로 추상화가 가능하겠군. 그리고 안에서 쓰이는 key를 같이 인자로 받아서 사용해야 겠다. + +// 데이터 : 필요한 데이터는 cart, name, key, value가 되겠다. + +// 계산 : setByName이라는 비즈니스 로직 함수가 수행되고 + + // 계산 : 내부에서 objectSet이라는 계산이 수행되고 newItem를 리턴한다. + + // 계산 : 내부에서 objectSet이라는 계산이 수행되고 newCart를 리턴한다. + + // 데이터 : 새로운 장바구니를 반환한다. \ No newline at end of file diff --git a/src/refactoring/herb/example-2.js b/src/refactoring/herb/example-2.js new file mode 100644 index 0000000..37ebafd --- /dev/null +++ b/src/refactoring/herb/example-2.js @@ -0,0 +1,17 @@ +for (var i = 0; i < foods.length; i++) { + var food = foods[i]; + cook(food); + eat(food); +} + +for (var i = 0; i < dishes.length; i++) { + var dish = dishes[i]; + wash(dish); + dry(dish); + putAway(dish); +} + + +// foods, dishes 와 함께 key를 배열을 받아서 반복문을 도는 액션이 하나 필요하겠다. + // key를 가지고 분기를 통해 해당 배열이 수행해야할 비즈니스로직을 묶은 액션을 수행하면 되겠다. + diff --git a/src/refactoring/herb/example-3.js b/src/refactoring/herb/example-3.js new file mode 100644 index 0000000..d9154a4 --- /dev/null +++ b/src/refactoring/herb/example-3.js @@ -0,0 +1,27 @@ +const user = { + id: '1', +}; + +const logToSnapErrors = (error) => console.log(`🚫 에러가 발생했어요: ${error.message}`); + +const fetchGetUserData = async ({id}) => { + const idCopy = id; + const response = await fetch(`https://jsonplaceholder.typicode.com/users?id=${idCopy}`); + return response; +} + +const fetchAsync = async (asyncLogic) => { + try { + return await asyncLogic; + } catch (err) { + logToSnapErrors(error); + } +} + +const getUserData = user => { + return fetchAsync((fetchGetUserData(user))) +} + + +// try~catch를 수행하는 수행하는 액션을 하나 만들자. + //try-catch를 getUserData 내부에 넣고 catch에 logToSnapErrors를 넣자. \ No newline at end of file diff --git a/src/refactoring/herb/iterator.js b/src/refactoring/herb/iterator.js new file mode 100644 index 0000000..3436b3b --- /dev/null +++ b/src/refactoring/herb/iterator.js @@ -0,0 +1,33 @@ +function* range(start, end) { + for (let i = start; i <= end; i++) { + yield i; + } +} + +const iterator = range(1, 10); + +function* skip(gen, skip) { + let count = 0; + for (let value of gen) { + if (count === skip) { + return; + } + yield value; + count++; + } +} + +function* take(gen, n) { + let count = 0; + for (let value of gen) { + if (count >= n) { + return; + } + yield value; + count++; + } +} + +const skipValue = skip(iterator, 2); + +console.log(skipValue); diff --git a/src/refactoring/herb/promise.js b/src/refactoring/herb/promise.js new file mode 100644 index 0000000..e39aa6b --- /dev/null +++ b/src/refactoring/herb/promise.js @@ -0,0 +1,442 @@ +// 1.Simplest Promise +const myFunction = () => { + return new Promise((resolve) => { + resolve('my promise'); + }); +}; + +// myFunction().then((result) => console.log(result)); + +// 2. Simpler Promise +// reject를 추가 +class SimplerPromise { + constructor(callback) { + const resolve = (value) => { + this.value = value; + }; + + const reject = (value) => { + this.value = value; + }; + + callback(resolve, reject); + } + + then(callback) { + callback(this.value); + } + + catch(callback) { + callback(this.value); + } +} + +// 3. Simple Promise + +class SimplePromise { + constructor(callback) { + this.state = 'pending'; + + const resolve = (value) => { + this.state = 'fulfilled'; + this.value = value; + }; + + const reject = (value) => { + this.state = 'rejected'; + this.value = value; + }; + callback(resolve, reject); + } + + then(callback) { + if (this.state === 'fulfilled') { + callback(this.value); + } + return this; + } + + catch(callback) { + if (this.state === 'rejected') { + callback(this.value); + } + return this; + } +} + +/** + * pending, fulfilled, rejected 상태를 추가 + * 그리고 then 과 catch 메소드에서 this를 반환 + */ + +const myResolve = () => { + return new SimplePromise((resolve, reject) => { + resolve('my resolve'); + }); +}; + +const myReject = () => { + return new SimplePromise((resolve, reject) => { + reject('my reject'); + }); +}; + +console.log('====myResolve===='); + +myResolve() + .then((result) => console.log(result)) //my resolve + .catch((result) => console.log(result)); + +console.log('====myReject===='); +myReject() + .then((result) => console.log(result)) + .catch((result) => console.log(result)); //my reject + +// 4.비동기 지원 프로미스 + +class AsyncPromise { + constructor(callback) { + this.state = 'pending'; + this.onFulfilledCallback = null; + this.onRejectedCallback = null; + + const resolve = (value) => { + this.state = 'fulfilled'; + this.value = value; + if (this.onFulfilledCallback !== null) { + this.onFulfilledCallback(value); + } + }; + + const reject = (value) => { + this.state = 'rejected'; + this.value = value; + if (this.onRejectedCallback !== null) { + this.onRejectedCallback(value); + } + }; + callback(resolve, reject); + } + + then(callback) { + if (this.state === 'pending') { + this.onFulfilledCallback = callback; + } + + if (this.state === 'fulfilled') { + callback(this.value); + } + return this; + } + + catch(callback) { + if (this.state === 'pending') { + this.onRejectedCallback = callback; + } + + if (this.state === 'rejected') { + callback(this.value); + } + return this; + } +} + +/** + * pending 상태일 때 콜백 함수를 멤버 변수에 저장한다. + * 그리고, 비동기 처리 후 resolve 또는 reject가 호출되면 콜백을 실행하도록 변경했다. + */ + +const myAsyncResolve = () => { + return new AsyncPromise((resolve, reject) => { + setTimeout(() => resolve('my async Resolve'), 1000); + }); +}; + +myAsyncResolve().then((result) => { + for (let i = 0; i < 10; i++) { + console.log(result); + } +}); + +//체이닝 지원 프로미스 +class ChainPromise { + constructor(callback) { + this.state = 'pending'; + this.onFulfilledCallback = null; + this.onRejectedCallback = null; + + const resolve = (value) => { + this.state = 'fulfilled'; + this.value = value; + if (this.onFulfilledCallback !== null) { + this.onFulfilledCallback(value); + } + }; + + const reject = (value) => { + this.state = 'rejected'; + this.value = value; + if (this.onRejectedCallback !== null) { + this.onRejectedCallback(value); + } + }; + callback(resolve, reject); + } + + then(callback) { + return new ChainPromise((resolve, reject) => { + if (this.state === 'pending') { + this.onFulfilledCallback = () => { + const result = callback(this.value); + resolve(result); + }; + } + + if (this.state === 'fulfilled') { + const result = callback(this.value); + resolve(result); + } + }); + } + + catch(callback) { + return new ChainPromise((resolve, reject) => { + if (this.state === 'pending') { + this.onRejectedCallback = () => { + const result = callback(this.value); + resolve(result); + }; + } + + if (this.state === 'rejected') { + const result = callback(this.value); + resolve(result); + } + }); + } +} + +/** + * then 과 catch 메소드에서 새로운 프로미스 객체를 반환함으로써 체이닝이 가능해졌다. + * 반환하는 프로미스 객체의 resolve 또는 reject에 이전 콜백 함수의 결괏값을 넣는 것이 핵심이다. + * + * catch 메소드에서 reject가 아닌 resolve를 호출한 것에 의문을 품을 수 있다. + * 실제 프로미스 객체의 프로미스 체이닝 작동방식을 보면 catch 뒤의 then 콜백이 실행되는 것을 볼 수 있다. + * 그 부분과 똑같이 작동하기 위해서는 catch에서 resolve를 호출해야한다. (이부분은 문제점이 있음) + */ + +// 6. 비동기 체이닝 지원 프로미스 +// 지금까지 비동기 체이닝의 예시를 들자면 아래와 같다. +// getUserId(userName).then((id) => return getUserAge(id)).then((age) => console.log(age)) + +class AsyncChainPromise { + constructor(callback) { + this.state = 'pending'; + this.onFulfilledCallback = null; + this.onRejectedCallback = null; + + const resolve = (value) => { + this.state = 'fulfilled'; + this.value = value; + if (this.onFulfilledCallback !== null) { + this.onFulfilledCallback(value); + } + }; + + const reject = (value) => { + this.state = 'rejected'; + this.value = value; + if (this.onRejectedCallback !== null) { + this.onRejectedCallback(value); + } + }; + callback(resolve, reject); + } + + then(callback) { + return new AsyncChainPromise((resolve, reject) => { + if (this.state === 'pending') { + this.onFulfilledCallback = () => { + this.handleCallback(callback, resolve); + }; + } + + if (this.state === 'fulfilled') { + this.handleCallback(callback, resolve); + } + }); + } + + catch(callback) { + return new AsyncChainPromise((resolve, reject) => { + if (this.state === 'pending') { + this.onRejectedCallback = () => { + this.handleCallback(callback, resolve); + }; + } + + if (this.state === 'rejected') { + this.handleCallback(callback, resolve); + } + }); + } + + handleCallback(callback, resolve, reject) { + const result = callback(this.value); + + if (result instanceof AsyncChainPromise) { + result.then(resolve); + } else { + resolve(result); + } + } +} + +/** + * instanceof 함수를 통해 콜백의 결과가 프로미스 객체이면 객체의 then을 호출함으로서 비동기 체이닝을 지원한다. + * 하지만 위 코드에는 큰 오점이있다. 아무런 조건 없이 then을 호출한다는 것이다. + * 이 부분을 수정해서 handleCallback 메소드를 다시 작성하겠다. + */ + +// 중요한 점은 pending 상태일 경우, 실행해야 할 함수를 result 인스턴스에 저장했다가 실행한다는 점이다. +// 하지만 reject가 수행되지 않는다. +// then 과 catch를 호출할때마다 새로운 프로미스가 만들어진다. 그리고 1초 뒤 첫번째 인스턴스에서 reject를 호출하기 때문에 +// 마지막 인스턴스의 콜백은 당연히 실행되지 않는다. +// 따라서 현재 인스턴스에서 실행할 콜백이 없을 실 fall through 해줘야 한다. +// 또한 동기적 프로미스도 위와 같은 이유로 fallthrough 기능이 필요하다. + +class Promise { + #value = null; + #state = 'pending'; + #child = null; + #onFulfilledCallbacks = []; + #onRejectedCallbacks = []; + #onFinallyCallbacks = []; + + constructor(callback) { + callback(this.#resolve, this.#reject); + } + + #resolve = (value) => { + if (this.#state === 'pending') { + this.#state = 'fulfilled'; + this.#value = value; + this.#onFinallyCallbacks.forEach((callback) => callback()); + + if (this.#onFulfilledCallbacks.length !== 0) { + this.#onFulfilledCallbacks.forEach((callback) => callback(value)); + } else { + this.#child?.#resolve(value); + } + } + }; + + #reject = (value) => { + if (this.#state == 'pending') { + this.#state = 'rejected'; + this.#value = value; + this.#onFinallyCallbacks.forEach((callback) => callback()); + + if (this.#onFinallyCallbacks.length !== 0) { + this.#onRejectedCallbacks.forEach((callback) => callback(value)); + } else { + this.#child?.#reject(value); + } + } + }; + + then(callback) { + this.#child = new Promise((resolve, reject) => { + if (this.#state === 'pending') { + this.#onFulfilledCallbacks.push(() => { + this.#handleCallback(callback, resolve, reject); + }); + } + + if (this.#state === 'fulfilled') { + this.#handleCallback(callback, resolve, reject); + } + + if (this.#state === 'rejected') { + reject(this.#value); + } + }); + + return this.#child; + } + + catch(callback) { + this.#child = new Promise((resolve, reject) => { + if (this.#state === 'pending') { + this.#onRejectedCallbacks.push(() => { + this.#handleCallback(callback, resolve, reject); + }); + } + + if (this.#state === 'rejected') { + this.#handleCallback(callback, resolve, reject); + } + + if (this.#state === 'fulfilled') { + resolve(this.#value); + } + }); + + return this.#child; + } + + finally(callback) { + this.#child = new Promise((resolve, reject) => { + if (this.#state === 'pending') { + this.#onFinallyCallbacks.push(() => { + this.#handleCallback(callback, resolve, reject); + }); + } + + if (this.#state === 'fulfilled' || this.#state === 'rejected') { + this.#handleCallback(callback, resolve, reject); + } + }); + + return this.#child; + } + + #handleCallback(callback, resolve, reject) { + try { + const result = callback(this.#value); + + if (result instanceof Promise) { + if (result.#state === 'fulfilled') { + result.then(resolve); + } + + if (result.#state === 'rejected') { + result.catch(reject); + } + + if (result.#state === 'pending') { + result.#onFulfilledCallbacks.push(() => result.then(resolve)); + result.#onRejectedCallbacks.push(() => result.catch(reject)); + } + } else { + resolve(result); + } + } catch (error) { + reject(error); + } + } +} + +const promise = new Promise((resolve, reject) => { + setTimeout(() => resolve('first'), 1000); +}); + +promise.then((result) => { + console.log('1', result); +}); +promise.then((result) => { + console.log('2', result); +}); +promise.then((result) => { + console.log('3', result); +}); diff --git a/src/refactoring/herb/test.js b/src/refactoring/herb/test.js new file mode 100644 index 0000000..180d730 --- /dev/null +++ b/src/refactoring/herb/test.js @@ -0,0 +1,56 @@ +function* range(start, end) { + for (let i = start; i <= end; i++) { + yield i; + } +} + +const iterator = range(1, 10); +const iterator2 = range(1, 10); + +function take(n) { + return function* (gen) { + let count = 0; + for (let value of gen) { + if (count >= n) { + return; + } + yield value; + count++; + } + }; +} + +function* skip(gen, n) { + let count = 0; + for (let value of gen) { + if (count !== n) yield value; + count++; + } +} + +const Map = (iterator, f) => { + let i = 0; + for (let element of iterator) { + f(i, element); + ++i; + } +}; + +const Reduce = (array, f, initValue) => { + let init = initValue ?? 0; + Map(array, (_, cur) => { + init = f(init, cur); + }); + + return init; +}; + +function pipe(...fns) { + return function (val) { + return fns.reduce((res, fn) => fn(res), val); + }; +} + +const operations = pipe(take(4), take(2), take(1))(iterator); + +console.log([...operations]); diff --git a/src/refactoring/herb/utils.js b/src/refactoring/herb/utils.js new file mode 100644 index 0000000..7347699 --- /dev/null +++ b/src/refactoring/herb/utils.js @@ -0,0 +1,56 @@ +const { performance } = require("perf_hooks"); +const Map = (array, f) => { + for (let i = 0; i < array.length; i++) { + f(i, array[i]); + } +}; + +const Filter = (array, f) => { + const tmp = []; + Map(array, (idx, value) => { + if (f(idx, value)) { + tmp.push(array[idx]); + } + }); + + return tmp; +}; + +const Reduce = (array, f, initValue) => { + const copyArray = array; + let init = initValue ?? 0; + Map(copyArray, (_, cur) => { + init = f(init, cur); + }); + + return init; +}; + +const array = [...Array(10000).keys()]; + +const t0 = performance.now(); +console.log("---------------Map----------------"); +Map(array, (idx, value) => { + console.log(`value : ${value}, index : ${idx}`); +}); + +console.log("---------------Filter----------------"); +const filteredArray = Filter(array, (idx, value) => { + if (value % 2 === 1) { + return value; + } +}); +console.log(filteredArray); + +console.log("---------------Reduce----------------"); +const reduce = Reduce( + [1, 2, 3, 4, 5], + (acc, cur) => { + return acc + cur; + }, + 10 +); + +console.log(reduce); +const t1 = performance.now(); +console.log(`Iterator Call to doSomething took ${t1 - t0} milliseconds.`); diff --git a/src/refactoring/herb/utils_iter.js b/src/refactoring/herb/utils_iter.js new file mode 100644 index 0000000..0b87851 --- /dev/null +++ b/src/refactoring/herb/utils_iter.js @@ -0,0 +1,66 @@ +const { performance } = require("perf_hooks"); +const Map = (iterator, f) => { + let i = 0; + for (let element of iterator) { + f(i, element); + ++i; + } +}; + +const Filter = (array, f) => { + const tmp = []; + Map(array, (idx, value) => { + if (f(idx, value)) { + tmp.push(value); + } + }); + + return tmp; +}; + +const Reduce = (array, f, initValue) => { + const copyArray = array; + let init = initValue ?? 0; + Map(copyArray, (_, cur) => { + init = f(init, cur); + }); + + return init; +}; + +const range = () => {}; + +const myIterable = { + *[Symbol.iterator]() { + yield 1; + yield 2; + yield 3; + }, +}; + +const t0 = performance.now(); +console.log("---------------Map----------------"); +Map(myIterable, (idx, value) => { + console.log(`value : ${value}, index : ${idx}`); +}); + +console.log("---------------Filter----------------"); +const iterFilteredArray = Filter(myIterable, (idx, value) => { + if (value % 2 === 1) { + return value; + } +}); +console.log(iterFilteredArray); + +console.log("---------------Reduce----------------"); +const iterReduce = Reduce( + myIterable, + (acc, cur) => { + return acc + cur; + }, + 0 +); + +console.log(iterReduce); +const t1 = performance.now(); +console.log(`Iterator Call to doSomething took ${t1 - t0} milliseconds.`); diff --git "a/src/refactoring/herb/\354\210\230\354\240\225\355\233\204-01_\354\241\260\352\261\264\353\266\200_\353\263\265\354\236\241\354\204\261.js" "b/src/refactoring/herb/\354\210\230\354\240\225\355\233\204-01_\354\241\260\352\261\264\353\266\200_\353\263\265\354\236\241\354\204\261.js" new file mode 100644 index 0000000..1039a86 --- /dev/null +++ "b/src/refactoring/herb/\354\210\230\354\240\225\355\233\204-01_\354\241\260\352\261\264\353\266\200_\353\263\265\354\236\241\354\204\261.js" @@ -0,0 +1,125 @@ + +console.log('----------------------------getAnimalEmoji-------------------------') +const getAnimalEmoji = animal => { + const animalHash = { + dog : '🐶', + cat : '🐱', + frog : '🐸', + panda : '🐼', + giraffe : '🦒', + monkey : '🐵', + unicorn : '🦄', + dragon : '🐲' + } + + return animalHash[animal]; +}; + +console.log(getAnimalEmoji('dragon')); + +console.log('----------------------------printMyAnimal-------------------------') +const printMyAnimal = animal => { + if (typeof animal !== 'string') { + return 'typeError!'; + } + + return `I have a ${animal}` +}; +console.log(printMyAnimal('panda')); + +console.log('----------------------------getAnimalDetails-------------------------') +const getAnimalDetails = animal => { + if(!animal) { + return 'No animal' + } + const properties = ['type','name','gender']; + let returnMsg = `${animal.name} is a ${animal.gender} ${animal.type}`; + properties.map((value) => { + if(!animal.hasOwnProperty(value)) { + returnMsg = `No animal ${value}`; + } + }) + + return returnMsg; +}; +console.log(getAnimalDetails()); +console.log(getAnimalDetails({ type: 'dog', gender: 'female' })); +console.log(getAnimalDetails({ type: 'dog', name: 'Lucy' })); +console.log(getAnimalDetails({ type: 'dog', name: 'Lucy', gender: 'female' })); + +console.log('----------------------------printFruits-------------------------') + +const printFruits = color => { + const fruitsHash = { + red : ['apple','strawberry'], + yellow : ['banana', 'pineapple'], + purple : ['grape', 'plum'], + } + + if(!fruitsHash.hasOwnProperty(color)) { + return []; + } + + return fruitsHash[color]; +}; +console.log(printFruits(null)); +console.log(printFruits('yellow')); + +console.log('----------------------------printVegetableName-------------------------') + +const printVegetableName = vegetable => { + if (vegetable && vegetable.hasOwnProperty('name')) { + console.log(vegetable.name); + return; + } + console.log('unknown'); +}; + +printVegetableName(undefined); +printVegetableName({}); +printVegetableName({ name: 'cabbage', quantity: 2 }); + +const car = { + model: 'Fiesta', + manufacturer: { + name: 'Ford', + address: { + street: 'Some Street Name', + number: '5555', + state: 'USA', + }, + }, +}; + +const carPropertyChecker = (object, property) => { + if(!object) { + return; + } + + if(object.hasOwnProperty(property)){ + return object[property]; + } + + if(object.manufacturer.hasOwnProperty(property)){ + return object.manufacturer[property]; + } + + if(object.manufacturer.address.hasOwnProperty(property)){ + return object.manufacturer.address[property]; + } + + return `default ${property}`; +} + +console.log(carPropertyChecker(car, 'model')); +console.log(carPropertyChecker(car, 'street')); +console.log(carPropertyChecker(car, 'number')); + +console.log('----------------------------isManufacturerFromUSA-------------------------') + +const isManufacturerFromUSA = (car) => { + if (car?.manufacturer?.address?.state === "USA") { + console.log("true"); + } +}; +console.log(isManufacturerFromUSA(car)); \ No newline at end of file diff --git "a/src/refactoring/herb/\354\210\230\354\240\225\355\233\204-02_\352\270\260\353\212\245_\355\212\271\354\240\225\355\225\230\352\270\260.js" "b/src/refactoring/herb/\354\210\230\354\240\225\355\233\204-02_\352\270\260\353\212\245_\355\212\271\354\240\225\355\225\230\352\270\260.js" new file mode 100644 index 0000000..a70ae17 --- /dev/null +++ "b/src/refactoring/herb/\354\210\230\354\240\225\355\233\204-02_\352\270\260\353\212\245_\355\212\271\354\240\225\355\225\230\352\270\260.js" @@ -0,0 +1,88 @@ +const slicer = (str, count) => { + if (str.length < count) return str + const [curr, next] = [str.slice(0, count), str.slice(count)] + return [curr, ...slicer(next, count)] +} + +class Phone { + #number + constructor(number) { + this.#number = slicer(number, 3); + } + + get countryCode() { + return this.#number[0]; + } + + get areaCode() { + return this.#number[1]; + } + + get baseNumber() { + return `${this.#number[2]} ${this.#number[3]}`; + } + + get formattedNumber() { + return `${this.#number[1]}-${this.#number[2]}-${this.#number[3]}`; + } + } + +class User { + #name + #lastName + #dni + #email + #phone + + constructor(name, lastName, dni, phone, email) { + this.#name = name; + this.#lastName = lastName; + this.#dni = dni; + this.#email = email; + this.#phone = new Phone(phone); + } + + get userName() { + return this.#name; + } + + get lastName() { + return this.#lastName; + } + + get dni() { + return this.#dni; + } + + get email() { + return this.#email; + } + + get phone() { + return this.#phone; + } + +} + +const user1 = new User( + 'Fernando', + 'Aparicio Galende', + '12345678S', + '+34635538973', + 'fernando.aparicio@guidesmiths.com', +) + + +const printUserInfo = (user) => { + console.log('USER PHONE:') + console.log(`Country code Phone : ${user.phone.countryCode}`) + console.log(`Phone: ${user.phone.formattedNumber}\n`) + console.log('USER DATA:') + console.log(`User name: ${user.name}`) + console.log(`User lastname: ${user.lastName}`) + console.log(`User DNI: ${user.dni}`) + console.log(`User email: ${user.email}`) + } + + +printUserInfo(user1); \ No newline at end of file diff --git "a/src/refactoring/herb/\354\210\230\354\240\225\355\233\204-03_\353\266\200\354\240\201\354\240\210\355\225\234_\355\217\211\352\260\200.js" "b/src/refactoring/herb/\354\210\230\354\240\225\355\233\204-03_\353\266\200\354\240\201\354\240\210\355\225\234_\355\217\211\352\260\200.js" new file mode 100644 index 0000000..dcbbd6d --- /dev/null +++ "b/src/refactoring/herb/\354\210\230\354\240\225\355\233\204-03_\353\266\200\354\240\201\354\240\210\355\225\234_\355\217\211\352\260\200.js" @@ -0,0 +1,127 @@ +const per2Int = (value, per) => (value * per) / 100; +class Client { + #name + #type + #location + #offers = { + normal : 0, + premium : 20, + } + + constructor(name, type, location) { + this.#name = name; + this.#type = type; + this.#location = location; + } + + get name() { + return this.#name; + } + + get type() { + return this.#type; + } + + get location() { + return this.#location; + } + + getPriceByProduct(productValue) { + const per = this.#offers[this.#type]; + return productValue - per2Int(productValue, per); + } +} +class Product { + #value + #name + #shipping + + constructor(value, name, shipping) { + this.#value = value; + this.#name = name; + this.#shipping = shipping; + } + + get value() { + return this.#value; + } + + get name() { + return this.#name; + } + + get shipping() { + return this.#shipping; + } +} + +class Order { + #id + #value + #client + #product + #taxes = { + EU : 21, + USA : 14, + } + + constructor(id, value, client, product) { + this.#id = id; + this.#value = value; + this.#client = client; + this.#product = product; + } + + get id() { + return this.#id; + } + + get value() { + return this.#value; + } + + get client() { + return this.#client; + } + + get product() { + return this.#product; + } + + getTaxes (location) { + return this.#taxes[location] + } +} + +const client = new Client('heomin', 'normal', 'USA') +const product = new Product(24000, '삼다수 24개입', 2); +const order = new Order(1, 24000, client, product); + +const printClientInfo = (client, product) => { + console.log('---------------Client Info---------------'); + console.log('client name : ',client.name); + console.log('client type :', client.type); + console.log('client location :', client.location); + console.log('client priceByProduct :', client.getPriceByProduct(product.value)); +} + +const printProductInfo = (product) => { + console.log('---------------Product Info-----------------'); + console.log('product value : ', product.value); + console.log('product Name : ', product.name); + console.log('product shipping : ', product.shipping); +} + +const printOrderInfo = (order) => { + console.log('----------------Order Info----------------'); + console.log('order id : ', order.id); + console.log('order value :', order.value); + console.log('order client :', order.client.name); + console.log('order product :', order.product.name); + console.log('total Amount :', order.client.getPriceByProduct(order.product.value) + order.getTaxes(order.client.location)); +} + +printClientInfo(client, product) +printProductInfo(product); +printOrderInfo(order); + diff --git "a/src/refactoring/\354\210\230\354\240\225\354\240\204-01_\354\241\260\352\261\264\353\266\200_\353\263\265\354\236\241\354\204\261.js" "b/src/refactoring/\354\210\230\354\240\225\354\240\204-01_\354\241\260\352\261\264\353\266\200_\353\263\265\354\236\241\354\204\261.js" new file mode 100644 index 0000000..8ba4a1d --- /dev/null +++ "b/src/refactoring/\354\210\230\354\240\225\354\240\204-01_\354\241\260\352\261\264\353\266\200_\353\263\265\354\236\241\354\204\261.js" @@ -0,0 +1,110 @@ +const getAnimalEmoji = animal => { + if (animal === 'dog') { + return '🐶'; + } else if (animal === 'cat') { + return '🐱'; + } else if (animal === 'frog') { + return '🐸'; + } else if (animal === 'panda') { + return '🐼'; + } else if (animal === 'giraffe') { + return '🦒'; + } else if (animal === 'monkey') { + return '🐵'; + } else if (animal === 'unicorn') { + return '🦄'; + } else if (animal === 'dragon') { + return '🐲'; + } +}; +console.log(getAnimalEmoji('dragon')); + +const printMyAnimal = animal => { + if (animal === 'dog' || animal === 'cat') { + console.log(`I have a ${animal}`); + } +}; +console.log(printMyAnimal('dog')); + +const getAnimalDetails = animal => { + let result; + + if (animal) { + if (animal.type) { + if (animal.name) { + if (animal.gender) { + result = `${animal.name} is a ${animal.gender} ${animal.type}`; + } else { + result = 'No animal gender'; + } + } else { + result = 'No animal name'; + } + } else { + result = 'No animal type'; + } + } else { + result = 'No animal'; + } + + return result; +}; +console.log(getAnimalDetails()); +console.log(getAnimalDetails({ type: 'dog', gender: 'female' })); +console.log(getAnimalDetails({ type: 'dog', name: 'Lucy' })); +console.log(getAnimalDetails({ type: 'dog', name: 'Lucy', gender: 'female' })); + +const printFruits = color => { + switch (color) { + case 'red': + return ['apple', 'strawberry']; + case 'yellow': + return ['banana', 'pineapple']; + case 'purple': + return ['grape', 'plum']; + default: + return []; + } +}; +console.log(printFruits(null)); +console.log(printFruits('yellow')); + +const printVegetableName = vegetable => { + if (vegetable && vegetable.name) { + console.log(vegetable.name); + } else { + console.log('unknown'); + } +}; +printVegetableName(undefined); +printVegetableName({}); +printVegetableName({ name: 'cabbage', quantity: 2 }); + +const car = { + model: 'Fiesta', + manufacturer: { + name: 'Ford', + address: { + street: 'Some Street Name', + number: '5555', + state: 'USA', + }, + }, +}; + +const model = (car && car.model) || 'default model'; + +const street = + (car && car.manufacturer && car.manufacturer.address && car.manufacturer.address.street) || 'default street'; + +const phoneNumber = car && car.manufacturer && car.manufacturer.address && car.manufacturer.phoneNumber; +console.log(model); +console.log(street); +console.log(phoneNumber); + +const isManufacturerFromUSA = () => { + if (car && car.manufacturer && car.manufacturer.address && car.manufacturer.address.state === 'USA') { + console.log('true'); + } +}; +console.log(isManufacturerFromUSA()); diff --git "a/src/refactoring/\354\210\230\354\240\225\354\240\204-02_\352\270\260\353\212\245_\355\212\271\354\240\225\355\225\230\352\270\260.js" "b/src/refactoring/\354\210\230\354\240\225\354\240\204-02_\352\270\260\353\212\245_\355\212\271\354\240\225\355\225\230\352\270\260.js" new file mode 100644 index 0000000..4640f26 --- /dev/null +++ "b/src/refactoring/\354\210\230\354\240\225\354\240\204-02_\352\270\260\353\212\245_\355\212\271\354\240\225\355\225\230\352\270\260.js" @@ -0,0 +1,74 @@ +function beforePrinter(user, phone) { + console.log('USER PHONE:'); + console.log(`Country code Phone : ${phone.countryCode}`); + console.log(`Phone area code: ${phone.areaCode}`); + console.log(`Phone base number: ${phone.baseNumber}\n`); + console.log('USER DATA:'); + console.log(`User name: ${user.userName}`); + console.log(`User lastname: ${user.userLastName}`); + console.log(`User DNI: ${user.userDni}`); + console.log(`User phone: ${user.userEmail}`); + console.log(`User email: ${user.userPhone}`); +} + +function afterPrinter(user, phone) { + console.log('USER PHONE:'); + console.log(`Country code Phone : ${phone.getCountryCode()}`); + console.log(`Phone: ${phone.getFormatPhone()}\n`); + console.log('USER DATA:'); + console.log(`User name: ${user.getName()}`); + console.log(`User lastname: ${user.getLastName()}`); + console.log(`User DNI: ${user.getDni()}`); + console.log(`User email: ${user.getPhone()}`); +} + +class Phone { + constructor(unformattedNumber) { + this.unformattedNumber = unformattedNumber; + } + + get countryCode() { + return this.unformattedNumber.substring(0, 3); + } + get areaCode() { + return `${this.unformattedNumber.substring(3, 6)}`; + } + get baseNumber() { + return `${this.unformattedNumber.substring(6, 9)} ${this.unformattedNumber.substring(9, 12)}`; + } +} + +class User { + constructor(name, lastName, dni, phone, email) { + this.name = name; + this.lastName = lastName; + this.dni = dni; + this.email = email; + this.phone = `${phone.countryCode} ${phone.areaCode} ${phone.baseNumber}`; + } + + get userName() { + return this.name; + } + get userLastName() { + return this.lastName; + } + get userDni() { + return this.dni; + } + get userEmail() { + return this.email; + } + get userPhone() { + return this.phone; + } +} + +const phone1 = new Phone('+34635538973'); +const user1 = new User('Fernando', 'Aparicio Galende', '12345678S', phone1, 'fernando.aparicio@guidesmiths.com'); + +console.log("================before Printer=============="); +beforePrinter(user1, phone1); + +console.log("================after Printer=============="); +// afterPrinter(user1, phone1); diff --git "a/src/refactoring/\354\210\230\354\240\225\354\240\204-03_\353\266\200\354\240\201\354\240\210\355\225\234_\355\217\211\352\260\200.js" "b/src/refactoring/\354\210\230\354\240\225\354\240\204-03_\353\266\200\354\240\201\354\240\210\355\225\234_\355\217\211\352\260\200.js" new file mode 100644 index 0000000..840e72c --- /dev/null +++ "b/src/refactoring/\354\210\230\354\240\225\354\240\204-03_\353\266\200\354\240\201\354\240\210\355\225\234_\355\217\211\352\260\200.js" @@ -0,0 +1,84 @@ +const per2Int = (value, per) => (value * per) / 100; + +const Client = ({ name, type, location }) => { + this.offers = { + normal: 0, + premium: 20, + }; + this.name = name; + this.type = type; + this.location = location; + + getName = () => this.name; + getType = () => this.name; + getLocation = () => this.location; + getPriceByProduct = product => product.value - per2Int(product.value, this.offers[this.type]); + + return { + getName, + getType, + getLocation, + getPriceByProduct, + }; +}; + +const Product = ({ value, name, shipping }) => { + this.value = value; + this.name = name; + this.shipping = shipping; + + getValue = () => this.value; + getProductName = () => this.name; + getShipping = () => this.shipping; + + return { + getValue, + getProductName, + getShipping, + }; +}; + +const Order = ({ id, value, client, product }) => { + this.taxes = { + EU: 21, + USA: 14, + }; + this.id = id; + this.value = value; + this.client = client; + this.product = product; + + getId = () => this.id; + getValue = () => this.value; + getClient = () => this.client; + getProduct = () => this.product; + getTaxes = loc => this.getTaxes(this.taxes[loc]); + + return { + getId, + getValue, + getClient, + getProduct, + }; +}; + +const Summary = ({ order }) => { + this.order = order; + + printSummary = () => { + let client = order.getClient(); + let product = order.product(); + + return `Order: ${order.getId()} + Client: ${client.getName()} + Product: ${product.getProductName()} + TotalAmount: ${client.getPriceByProduct(product) + this.order.getTaxes(client.getLocation())} + + + Arrival in: ${this.order.product.getShipping()} days.`; + }; + + return { + printSummary, + }; +}; diff --git a/src/use-rxjs/package-lock.json b/src/use-rxjs/package-lock.json new file mode 100644 index 0000000..b10ac9b --- /dev/null +++ b/src/use-rxjs/package-lock.json @@ -0,0 +1,44 @@ +{ + "name": "use-rxjs", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "use-rxjs", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "rxjs": "^7.8.0" + } + }, + "node_modules/rxjs": { + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.0.tgz", + "integrity": "sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/tslib": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" + } + }, + "dependencies": { + "rxjs": { + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.0.tgz", + "integrity": "sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==", + "requires": { + "tslib": "^2.1.0" + } + }, + "tslib": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" + } + } +} diff --git a/src/use-rxjs/package.json b/src/use-rxjs/package.json new file mode 100644 index 0000000..f1166a5 --- /dev/null +++ b/src/use-rxjs/package.json @@ -0,0 +1,15 @@ +{ + "name": "use-rxjs", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "rxjs": "^7.8.0" + } +} diff --git a/src/use-rxjs/src/code.js b/src/use-rxjs/src/code.js new file mode 100644 index 0000000..bab0447 --- /dev/null +++ b/src/use-rxjs/src/code.js @@ -0,0 +1,21 @@ +const rxjs = require('rxjs'); +const { of } = require('rxjs'); // 생성함수 +const { map } = require('rxjs/operators'); // 연산함수 + +const x = rxjs.of(1, 2, 3); + +x.subscribe(data => { + console.log(data); +}); +// 1 +// 2 +// 3 + +const y = of(1, 2, 3).pipe(map(x => x * 10)); + +y.subscribe(data => { + console.log(data); +}); +// 10 +// 20 +// 30 diff --git a/src/utils/groupBy.test.js b/src/utils/groupBy.test.js new file mode 100644 index 0000000..eddd03a --- /dev/null +++ b/src/utils/groupBy.test.js @@ -0,0 +1,50 @@ +// FIXME: npm test /src/utils/groupBy.test.js + +// 어떤 것을 해볼까요? +const groupBy = (arr, callback) => { + return arr; +}; + +describe('groupBy 테스트', () => { + describe('non-lazy', () => { + it('case: 1, Normal', () => { + const array = [6.1, 4.2, 6.3]; + const grouped = groupBy(array, Math.floor); + + expect(grouped).toEqual({ 4: [4.2], 6: [6.1, 6.3] }); + }); + + it('case: 2, Advanced', () => { + const array = [ + [1, 'a'], + [2, 'a'], + [2, 'b'], + ]; + + // 두 번째 인자가 index + const [groupedFirstIndex, groupedSecondIndex] = [groupBy(array, 0), groupBy(array, 1)]; + + expect(groupedFirstIndex).toEqual({ + 1: [[1, 'a']], + 2: [ + [2, 'a'], + [2, 'b'], + ], + }); + + expect(groupedSecondIndex).toEqual({ + a: [ + [1, 'a'], + [2, 'a'], + ], + b: [[2, 'b']], + }); + }); + + it('case: 3, Advanced', () => { + const grouped = groupBy({ a: 6.1, b: 4.2, c: 6.3 }, Math.floor); + + expect(grouped).toEqual({ 4: [4.2], 6: [6.1, 6.3] }); + }); + }); +}); diff --git a/src/utils/lib.js b/src/utils/lib.js new file mode 100644 index 0000000..40d45a2 --- /dev/null +++ b/src/utils/lib.js @@ -0,0 +1,373 @@ +// FIXME: 프로토타입 ================================================================= +Array.prototype.generate = function (size = 10) { + let returnArray = []; + + while (returnArray.length < size) { + const temp = this[parseInt(Math.random() * this.length)]; + + returnArray = [...returnArray, temp]; + } + + return returnArray; +}; + +Array.prototype.shuffle = function () { + for (let i = this.length - 1; i > 0; i--) { + let j = Math.floor(Math.random() * (i + 1)); + [this[i], this[j]] = [this[j], this[i]]; + } + return this; +}; + +// FIXME: 상수 라인=================================================================== +const 엄청_큰_배열_크기 = 10000; + +const 이름_목록 = [ + 'Zachary', + 'Zayden', + 'Zane', + 'Zion', + 'Yadiel', + 'Yousef', + 'Xavier', + 'Xander', + 'Xayden', + 'William', + 'Wyatt', + 'Wesley', + 'Walter', + 'Wade', + 'Warren', + 'Winston', + 'Willie', + 'Will', + 'Woodrow', + 'VVincent', + 'Valentino', + 'Victor', + 'Vincenzo', + 'Van', + 'Vivaan', + 'Vihaan', + 'Vance', + 'Ucal', + 'Ulan', + 'Uluka', + 'Uner', + 'Uriah', + 'Thomas', + 'Tyler', + 'Theodore', + 'Tony', + 'Travis', + 'Troy', + 'Timothy', + 'Titan', + 'Toby', + 'Tanner', + 'Samuel', + 'Steven', + 'Sebastian', + 'Santiago', + 'Simon', + 'Sean', + 'Stephen', + 'Scott', + 'Ryan', + 'Randolph', + 'Robert', + 'Roman', + 'River', + 'Raymond', + 'Richard', + 'Rowan', + 'Russell', + 'Ryder', + 'Quincy', + 'Quade', + 'Parker', + 'Patrick', + 'Paul', + 'Peter', + 'Prince', + 'Phillip', + 'Pablo', + 'Pedro', + 'Oliver', + 'Owen', + 'Oscar', + 'Orlando', + 'Odin', + 'Oakley', + 'Ozzy', + 'Ollie', + 'Noah', + 'Nicholas', + 'Nolan', + 'Nikolai', + 'Nathan', + 'Nelson', + 'Matthew', + 'Maddox', + 'Max', + 'Michael', + 'Mason', + 'Marcus', + 'Miles', + 'Mark', + 'Mario', + 'Mandy', + 'Liam', + 'Logan', + 'Lucas', + 'Luke', + 'Lincoln', + 'Leo', + 'Luis', + 'Leonardo', + 'Luciano', + 'Lucian', + 'Kevin', + 'Kai', + 'Kale', + 'Kade', + 'Kaiden', + 'Knox', + 'Ken', + 'Kendrick', + 'Jayden', + 'James', + 'Jacob', + 'Julian', + 'Jackson', + 'Jeffery', + 'Jarry', + 'Jeremy', + 'Jayce', + 'Jonathan', + 'Justin', + 'Joel', + 'Ian', + 'Ivan', + 'Ismael', + 'Israel', + 'Isaac', + 'Iker', + 'Henry', + 'Hunter', + 'Hayden', + 'Hendrix', + 'Harry', + 'Hugo', + 'Harrison', + 'Harvey', + 'Hudson', + 'Gabriel', + 'Gael', + 'Gunner', + 'Garrett', + 'Gregory', + 'Griffin', + 'Grady', + 'George', + 'Francisco', + 'Felix', + 'Fernando', + 'Fabian', + 'Finn', + 'Frankie', + 'Fredrick', + 'Fabbro', + 'Floyd', + 'Ethan', + 'Eli', + 'Evan', + 'Eric', + 'Emmett', + 'Elliott', + 'Everett', + 'Enzo', + 'Danial', + 'Dylan', + 'Damian', + 'Declan', + 'Derek', + 'Dante', + 'Dominick', + 'Dilan', + 'Drew', + 'Chistopher', + 'Connor', + 'Charles', + 'Caleb', + 'Cooper', + 'Colin', + 'Corbin', + 'Covy', + 'Chico', + 'Benjamin', + 'Brandon', + 'Bentley', + 'Blake', + 'Brody', + 'Bennett', + 'Bradley', + 'Brooks', + 'Bruno', + 'Aiden', + 'Andew', + 'Adrian', + 'Asher', + 'Austin', + 'Ayaan', + 'Aaron', + 'Alex', + 'Andres', + 'Antonio', + 'Archer', +]; + +const 도시_목록 = [ + 'Afghanistan', + 'Algeria', + 'Angola', + 'Argentina', + 'Austria', + 'Australia', + 'Bangladesh', + 'Belarus', + 'Belgium', + 'Bolivia', + 'Bosnia', + 'Brazil', + 'Britain', + 'Bulgaria', + 'Cambodia', + 'Cameroon', + 'Canada', + 'Central', + 'Chad', + 'China', + 'Colombia', + 'Costa', + 'Croatia', + 'the', + 'Democratic', + 'Denmark', + 'Ecuador', + 'Egypt', + 'El', + 'England', + 'Estonia', + 'Ethiopia', + 'Finland', + 'France', + 'Germany', + 'Ghana', + 'Greece', + 'Guatemala', + 'Holland', + 'Honduras', + 'Hungary', + 'Iceland', + 'India', + 'Indonesia', + 'Iran', + 'Iraq', + 'Ireland', + 'Israel', + 'Italy', + 'Ivory', + 'Jamaica', + 'Japan', + 'Jordan', + 'Kazakhstan', + 'Kenya', + 'Laos', + 'Latvia', + 'Libya', + 'Lithuania', + 'Madagascar', + 'Malaysia', + 'Mali', + 'Mauritania', + 'Mexico', + 'Morocco', + 'Namibia', + 'New', + 'Nicaragua', + 'Niger', + 'Nigeria', + 'Norway', + 'Oman', + 'Pakistan', + 'Panama', + 'Paraguay', + 'Peru', + 'The', + 'Poland', + 'Portugal', + 'Republic', + 'Romania', + 'Russia', + 'Saudi', + 'Scotland', + 'Senegal', + 'Serbia', + 'Singapore', + 'Slovakia', + 'Somalia', + 'South', + 'Spain', + 'Sudan', + 'Sweden', + 'Switzerland', + 'Syria', + 'Thailand', + 'Tunisia', + 'Turkey', + 'Turkmenistan', + 'Ukraine', + 'The', + 'The', + 'Uruguay', + 'Vietnam', + 'Wales', + 'Zambia', + 'Zimbabwe', +]; + +const 무작위_이름_목록 = 이름_목록.generate(엄청_큰_배열_크기); +const 무작위_나이_목록 = Array.from({ length: 엄청_큰_배열_크기 }, () => Math.floor(Math.random() * 99) + 1); +const 무작위_도시_목록 = 도시_목록.generate(엄청_큰_배열_크기); + +const 무작위_데이터_리스트 = Array.from({ length: 엄청_큰_배열_크기 }).map((_, index) => ({ + name: 무작위_이름_목록[index], + age: 무작위_나이_목록[index], + city: 무작위_도시_목록[index], +})); + +// FIXME: 함수 라인 ================================================================== +const timer = { + time: 0, + reset: () => { + this.timer = 0; + }, + start: () => { + this.time = performance.now(); + }, + end: () => { + console.log(`추정 시간: ${performance.now() - this.time}`); + this.time = 0; + }, +}; + +timer.start(); +const getMockData = () => Object.assign([], 무작위_데이터_리스트); +console.log(getMockData()); +timer.end(); + +// module.exports = { +// timer, +// getMockData, +// }; diff --git a/src/utils/unique.test.js b/src/utils/unique.test.js new file mode 100644 index 0000000..b5f3a92 --- /dev/null +++ b/src/utils/unique.test.js @@ -0,0 +1,51 @@ +// FIXME: npm test /src/utils/unique.test.js + +// 어떤 것을 해볼까요? +const unique = (arr, callback, isSorted) => { + return arr; +}; + +describe('unique 테스트', () => { + describe('non-lazy', () => { + it('case: 1, Normal', () => { + const [firstArray, secondArray] = [ + [2, 1, 2], + [1, 2, 1], + ]; + const firstUniqueArray = unique(firstArray); + const secondUniqueArray = unique(secondArray); + + expect(firstUniqueArray).toEqual([2, 1]); + expect(secondUniqueArray).toEqual([1, 2]); + }); + + it('case: 2, Advanced', () => { + const [firstArray, secondArray, thirdArray] = [ + [1, 2, 3], + [1, 1, 2, 2, 3], + [1, 2, 3, 3, 3, 3, 3], + ]; + const firstUniqueArray = unique(firstArray, undefined, true); + const secondUniqueArray = unique(secondArray, undefined, true); + const thirdUniqueArray = unique(thirdArray, undefined, true); + + expect(firstUniqueArray).toEqual([1, 2, 3]); + expect(secondUniqueArray).toEqual([1, 2, 3]); + expect(thirdUniqueArray).toEqual([1, 2, 3]); + }); + + it('case: 3, Advanced', () => { + const objects = [ + { x: 1, y: 2 }, + { x: 2, y: 1 }, + { x: 1, y: 2 }, + ]; + const uniqueObjects = unique(objects); + + expect(uniqueObjects).toEqual([ + { x: 1, y: 2 }, + { x: 2, y: 1 }, + ]); + }); + }); +});