├── .gitattributes ├── .github ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── .npmignore ├── .npmrc ├── LICENSE ├── README.md ├── docs ├── 404.html ├── CNAME ├── api │ └── index.html ├── content │ ├── examples.html │ └── home.html ├── css │ ├── docma.css │ └── styles.css ├── examples │ └── index.html ├── home │ └── index.html ├── img │ ├── grumpy-badge.svg │ ├── grumpy-icon-light.png │ ├── grumpy-icon.png │ ├── grumpy-npm-light.png │ ├── grumpy-npm.png │ ├── grumpy-npm.svg │ ├── grumpy.png │ ├── grumpy.svg │ ├── tree-deep.png │ ├── tree-first.png │ ├── tree-folded.png │ ├── tree-last.png │ ├── tree-node.png │ ├── tree-parent.png │ └── tree-space.png ├── index.html └── js │ ├── app.min.js │ ├── docma-web.js │ ├── grumpy.min.js │ ├── highlight.pack.js │ └── tippy.all.min.js ├── package.json ├── rollup.config.js ├── src └── index.ts ├── tsconfig.json └── yarn.lock /.gitattributes: -------------------------------------------------------------------------------- 1 | docs/* linguist-vendored 2 | -------------------------------------------------------------------------------- /.github/CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at mail.contraband@gmail.com. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | 75 | For answers to common questions about this code of conduct, see 76 | https://www.contributor-covenant.org/faq 77 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | **The issue tracker is only for bug reports and enhancement suggestions.** 4 | 5 | If you wish to contribute to the Grumpy codebase or documentation, feel free to fork the repository and submit a 6 | pull request. We use ESLint to enforce a consistent coding style, so having that set up in your editor of choice 7 | is a great boon to your development process. 8 | 9 | ## Setup 10 | To get ready to work on the codebase, please do the following: 11 | 12 | 1. Fork & clone the repository, and make sure you're on the **master** branch 13 | 2. Run `npm install` 14 | 3. Make your changes. 15 | 4. Run `npm test` to run ESLint. 16 | 5. [Submit a pull request](https://github.com/cringiest/grumpy/compare) 17 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # aidenybai 4 | patreon: ayb 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | custom: # Replace with a single custom sponsorship URL 9 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | **Please describe the changes this PR makes and why it should be merged:** 2 | 3 | **Semantic versioning classification:** 4 | - [ ] This PR changes the package's interface (methods or parameters added) 5 | - [ ] This PR includes breaking changes (methods removed or renamed, parameters moved or removed) 6 | - [ ] This PR **only** includes non-code changes, like changes to documentation, README, etc. 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Packages 2 | node_modules/ 3 | yarn.lock 4 | package-lock.json 5 | dist/ 6 | 7 | # Other 8 | .eslintrc.json 9 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | # Packages 2 | node_modules/ 3 | yarn.lock 4 | package-lock.json 5 | 6 | # Deploy 7 | docs/ 8 | test/ 9 | .github/ 10 | .travis.yml 11 | 12 | # License 13 | LICENSE.txt 14 | 15 | # Config 16 | .eslintrc.json 17 | .eslintignore 18 | tsconfig.json 19 | tslint.json 20 | 21 | # Other 22 | .npmrc 23 | .gitignore 24 | .gitattributes 25 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | > This was originally a TypeScript port with extra features of [`@discordjs/collection`](https://github.com/discordjs/collection) when it was written in JavaScript and integrated into the monorepo. **Please do not use this package**, use [`@discordjs/collection`](https://github.com/discordjs/collection) for a maintained version. 2 | 3 | # Grumpy 4 | 5 | 6 | 7 | 8 | ##### [API](https://grumpy.js.org/api) | [Install](https://yarn.pm/grumpy) | [Github](https://github.com/cringiest/grumpy) 9 | 10 | > Grumpy is a NodeJS library which provides a painless way to deal with key-value storage. It's much more efficient than Object/Array hashmaps because it is based off of Javascript's built in [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) class. 11 | 12 | ##### What does Grumpy do? 13 | 14 | Most things that you can do with `Array` and `Map` can be done using Grumpy! Here are a few examples to get you started: 15 | 16 | * Add/remove sets of values in a scoped `Group`. 17 | * Convert `Groups` into other data structures. 18 | * Manipulate `Groups` using familiar `Array` methods. 19 | * Fetch values from `Groups` using built-in methods. 20 | 21 | ##### Why should I use Grumpy? 22 | 23 | * Small file size (~1kb). 24 | * Blazing fast performance. 25 | * Minimal & intuitive API. 26 | 27 | Try it out here: [https://npm.runkit.com/grumpy](https://npm.runkit.com/grumpy) 28 | 29 | ## Getting Started 30 | 31 | ### Installation 32 | 33 | To use Grumpy in your project, run: 34 | ```bash 35 | yarn add grumpy 36 | # or "npm install grumpy" 37 | ``` 38 | 39 | ### Usage 40 | Note: Grumpy requires at least `Node v6.4.0`. 41 | 42 | Create an instance of Grumpy and manipulate the group. We're going to be assigning `key` to `value` and fetching and checking it once we've set it. 43 | 44 | **Example** - Getting and setting values 45 | 46 | Save file as **example.js** 47 | 48 | ```js 49 | const Grumpy = require('grumpy'); 50 | const group = new Grumpy(); 51 | 52 | group.set('key', 'value'); 53 | 54 | group.get('key'); // returns 'value' 55 | group.has('key'); // returns true 56 | ``` 57 | 58 | Execute script on the command line 59 | ```bash 60 | node example.js 61 | ``` 62 | [More Examples](https://grumpy.js.org/examples/) 63 | -------------------------------------------------------------------------------- /docs/404.html: -------------------------------------------------------------------------------- 1 | // Go to https://grumpy.js.org 2 | 3 | -------------------------------------------------------------------------------- /docs/CNAME: -------------------------------------------------------------------------------- 1 | grumpy.js.org 2 | -------------------------------------------------------------------------------- /docs/api/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 20 | 21 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/content/examples.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 54 | 55 | 56 | 57 |
58 |
59 |
60 |
61 |

Examples

62 | Grumpy comes with this utility class known as Group. It extends JavaScript's native Map class, so it has all the features of Map and more!

63 |
64 | If you're not familiar with Map, read MDN's page on it before continuing. You should be familiar with Array methods as well. We will also be using some ES6 features, so read up on it if you do not know what they are. 65 |
66 | In essence, Map allow for an association between unique keys and their values, but lack an iterative interface. For example, how can you transform every value or filter the entries in a Map easily? This is the point of the Group class!


67 |

Array-like Methods

68 |

Many of the methods on Group are based on their namesake in Array. One of them is find:

69 |

 70 | array.find(user => user.foo === 'bar');
 71 | group.find(user => user.foo === 'bar');
 72 |                     

73 | The interface of the callback function is very similar between the two. For arrays, callbacks are usually passed the parameters (value, index, array), where value is the value it iterated to, index is the current index, and array is the array itself. For groups, you would have (value, key, group). Here, value is the same, but key is the key of the value, and group is the group itself instead. 74 |

75 | Methods that follow this philosophy of staying close to the Array interface are as follows: 76 |
77 |
    78 |
  • find
  • 79 |
  • filter - Note that this returns a Group rather than an Array.
  • 80 |
  • map - Yet this returns an Array of values instead of a Group!
  • 81 |
  • every
  • 82 |
  • some
  • 83 |
  • reduce
  • 84 |
  • concat
  • 85 |
  • sort
  • 86 |
87 |
88 |

Converting to Array

89 |

There are two ways you might want to convert a Group into an Array. The first way is the array or keyArray methods. They simply create an array from the items in the group, but also caches it too:

90 |

 91 | group.array();
 92 | group.array(); // Not computed again the second time, it is cached!
 93 | 
 94 | group.keyArray();
 95 | group.keyArray(); // Not computed again the second time, it is cached!
 96 |                     
97 |
98 |
99 | Many people use array way too much! This leads to unneeded caching of data and confusing code. Before you use array or similar, ask yourself if whatever you are trying to do can't be done with the given Map or Group methods or with a for-of loop. 100 |
101 |

Extra Utilities

102 |

Some methods are not from Array and are instead completely new to standard JavaScript.

103 |

104 | group.random(); // A random value. Be careful, this uses `array` so caching is done.
105 | 
106 | group.first(); // The first value.
107 | 
108 | group.first(5); // The first 5 values.
109 | 
110 | group.last(); // Similar to `first`, but from the end. This uses `array`.
111 | group.last(2);
112 | 
113 | group.sift(user => user.foo === 'bar'); // Removes from the group anything that meets a criteria.
114 |                     
115 | A more complicated method is cut, which splits a group into two, based on a certain criteria. You can think of it as two filters, but done at the same time: 116 |

117 |

118 | const [foo, bar] = group.cut(user => user.baz);
119 | 
120 | foo.every(user => user.baz); // Both return true.
121 | bar.every(user => !user.baz);
122 |                     
123 |
124 |
125 |
126 |
127 |
128 | 129 | 130 | 131 | -------------------------------------------------------------------------------- /docs/content/home.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 70 | 71 | 72 | 73 |
74 |
75 |
76 |

Grumpy Version Badge

77 |

78 | 79 |

80 |
API | Install | Github
81 |
Grumpy is a NodeJS library which provides a painless way to deal with key-value storage. It's much more efficient than Object/Array hashmaps because it is based off of Javascript's built in Map class.
82 |

What does Grumpy do?

83 |

Most things that you can do with Array and Map can be done using Grumpy! Here are a few examples to get you started:

84 |
    85 |
  • Add/remove sets of values in a scoped Group.
  • 86 |
  • Convert Groups into other data structures.
  • 87 |
  • Manipulate Groups using familiar Array methods.
  • 88 |
  • Fetch values from Groups using built-in methods.
  • 89 |
90 |

Why should I use Grumpy?

91 |
    92 |
  • Small file size (~1kb).
  • 93 |
  • Blazing fast performance.
  • 94 |
  • Minimal & intuitive API
  • 95 |
96 | Try it out here: https://npm.runkit.com/grumpy 97 |
98 |
99 |
100 |

Installation

101 |

Install grumpy via Yarn.

102 |
103 |
yarn add grumpy
104 |
105 |
106 |
107 |
108 |
109 |
110 |

Usage

111 | Note: Grumpy requires at least Node v6.4.0. 112 |

113 | Create an instance of Grumpy and manipulate the group. We're going to be assigning 'key' to 'value' and fetching and checking it once we've set it. 114 |

115 | Example - Getting and setting values 116 |

117 | Save file as example.js 118 |

119 |

120 | const Grumpy = require('grumpy');
121 | const group = new Grumpy();
122 | 
123 | group.set('key', 'value');
124 | 
125 | group.get('key'); // returns 'value'
126 | group.has('key'); // returns true
127 |                     
128 | More Examples 129 |
130 |
131 |
132 |
133 |
134 | 135 | 136 | 137 | -------------------------------------------------------------------------------- /docs/css/docma.css: -------------------------------------------------------------------------------- 1 | ::-webkit-scrollbar-thumb{background-color:#313d4f;border-radius:10px}::-webkit-scrollbar-thumb:window-inactive{background-color:transparent}img.docma{display:inline-block;border:0 none}img.docma.emoji,img.docma.emoji-sm,img.docma.emoji-1x{height:1em;width:1em;margin:0 .05em 0 .1em;vertical-align:-0.1em}img.docma.emoji-md{height:1.33em;width:1.33em;margin:0 .0665em 0 .133em;vertical-align:-0.133em}img.docma.emoji-lg{height:1.66em;width:1.66em;margin:0 .083em 0 .166em;vertical-align:-0.166em}img.docma .emoji-2x{height:2em;width:2em;margin:0 .1em 0 .2em;vertical-align:-0.2em}img.docma .emoji-3x{height:3em;width:3em;margin:0 .15em 0 .3em;vertical-align:-0.3em}img.docma .emoji-4x{height:4em;width:4em;margin:0 .2em 0 .4em;vertical-align:-0.4em}img.docma .emoji-5x{height:5em;width:5em;margin:0 .25em 0 .5em;vertical-align:-0.5em}ul.docma.task-list{list-style:none;padding-left:0;margin-left:0}ul.docma.task-list>li.docma.task-item{padding-left:0;margin-left:0} 2 | -------------------------------------------------------------------------------- /docs/css/styles.css: -------------------------------------------------------------------------------- 1 | ::-webkit-scrollbar-thumb{background-color:#313d4f;border-radius:10px}::-webkit-scrollbar-thumb:window-inactive{background-color:transparent}caption,th{text-align:left}.table,legend{max-width:100%}.clearfix::after,.row:after,.row:before{content:""}.row,.row:after{clear:both}.span-3,.table{width:100%}.no-pointer-events,img.item-tree-line{pointer-events:none}.underline-skip,a:focus,a:hover{-webkit-text-decoration-line:underline;text-decoration-line:underline;text-decoration-skip:ink;-webkit-text-decoration-skip:ink;text-decoration-skip-ink:auto}@font-face{font-family:'Fira Sans';font-style:italic;font-weight:400;src:local('Fira Sans Italic'),local('FiraSans-Italic'),url(https://fonts.gstatic.com/s/firasans/v8/va9C4kDNxMZdWfMOD5VvkrjJYTc.ttf) format('truetype')}@font-face{font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans Regular'),local('FiraSans-Regular'),url(https://fonts.gstatic.com/s/firasans/v8/va9E4kDNxMZdWfMOD5Vvl4jO.ttf) format('truetype')}@font-face{font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),local('FiraSans-Medium'),url(https://fonts.gstatic.com/s/firasans/v8/va9B4kDNxMZdWfMOD5VnZKveRhf_.ttf) format('truetype')}@font-face{font-family:'Fira Sans';font-style:normal;font-weight:700;src:local('Fira Sans Bold'),local('FiraSans-Bold'),url(https://fonts.gstatic.com/s/firasans/v8/va9B4kDNxMZdWfMOD5VnLK3eRhf_.ttf) format('truetype')}@font-face{font-family:'Overpass Mono';font-style:normal;font-weight:400;src:local('Overpass Mono Regular'),local('OverpassMono-Regular'),url(https://fonts.gstatic.com/s/overpassmono/v4/_Xmq-H86tzKDdAPa-KPQZ-AC1i-0sw.ttf) format('truetype')}@font-face{font-family:'Overpass Mono';font-style:normal;font-weight:600;src:local('Overpass Mono SemiBold'),local('OverpassMono-SemiBold'),url(https://fonts.gstatic.com/s/overpassmono/v4/_Xm3-H86tzKDdAPa-KPQZ-AC3vCQo_CXAw.ttf) format('truetype')}@font-face{font-family:'Overpass Mono';font-style:normal;font-weight:700;src:local('Overpass Mono Bold'),local('OverpassMono-Bold'),url(https://fonts.gstatic.com/s/overpassmono/v4/_Xm3-H86tzKDdAPa-KPQZ-AC3pSRo_CXAw.ttf) format('truetype')}.background-clip-padding{-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.trans-all-ease-fast{-webkit-transition:all .15s ease;transition:all .15s ease}.trans-all-ease-slow{-webkit-transition:all .5s ease;transition:all .5s ease}.trans-all-ease{-webkit-transition:all .3s ease;transition:all .3s ease}.trans-height-ease{-webkit-transition:opacity .15s ease,height .15s ease;transition:opacity .15s ease,height .15s ease}.trans-delay-1{transition-delay:.1s}.no-trans{-webkit-transition-property:none;transition-property:none}.no-trans-force{-webkit-transition-property:none!important;transition-property:none!important}.no-margin,.no-space{margin:0!important}.no-space-top{margin-top:0!important}.no-space-right{margin-right:0!important}.no-space-bottom{margin-bottom:0!important}.no-space-left{margin-left:0!important}.space-xs{margin-left:7px!important}.space-sm{margin-left:15px!important}.space,.space-md{margin-left:25px!important}.space-lg{margin-left:40px!important}.space-top-xs{margin-top:7px!important}.space-top-sm{margin-top:15px!important}.space-top,.space-top-md{margin-top:25px!important}.space-top-lg{margin-top:40px!important}.space-right-xs{margin-right:7px!important}.space-right-sm{margin-right:15px!important}.space-right,.space-right-md{margin-right:25px!important}.space-right-lg{margin-right:40px!important}.space-bottom-xs{margin-bottom:7px!important}.space-bottom-sm{margin-bottom:15px!important}.space-bottom,.space-bottom-md{margin-bottom:25px!important}.space-bottom-lg{margin-bottom:40px!important}.space-left-xs{margin-left:7px!important}.space-left-sm{margin-left:15px!important}.space-left,.space-left-md{margin-left:25px!important}.space-left-lg{margin-left:40px!important}.no-pad,.no-padding{padding:0!important}.no-pad-top{padding-top:0!important}.no-pad-right{padding-right:0!important}.no-pad-bottom{padding-bottom:0!important}.no-pad-left{padding-left:0!important}.pad-xs{padding:7px!important}.pad-sm{padding:15px!important}.pad,.pad-lg,.pad-md{padding:7px!important}.pad-top-xs{padding-top:7px!important}.pad-top-sm{padding-top:15px!important}.pad-top,.pad-top-md{padding-top:25px!important}.pad-top-lg{padding-top:40px!important}.pad-right-xs{padding-right:7px!important}.pad-right-sm{padding-right:15px!important}.pad-right,.pad-right-md{padding-right:25px!important}.pad-right-lg{padding-right:40px!important}.pad-bottom-xs{padding-bottom:7px!important}.pad-bottom-sm{padding-bottom:15px!important}.pad-bottom,.pad-bottom-md{padding-bottom:25px!important}.pad-bottom-lg{padding-bottom:40px!important}.pad-left-xs{padding-left:7px!important}.pad-left-sm{padding-left:15px!important}.pad-left,.pad-left-md{padding-left:25px!important}.pad-left-lg{padding-left:40px!important}legend,td,th{padding:0}.fw-bold{font-weight:700!important}.fw-medium{font-weight:500!important}.fw-normal{font-weight:400!important}.pointer{cursor:pointer!important}.vertical-middle{vertical-align:middle}progress,sub,sup{vertical-align:baseline}.inline-block{display:inline-block}.absolute{position:absolute}.no-scroll{overflow:hidden!important}.no-wrap,.nowrap{white-space:nowrap!important}.snap-left{display:block;float:left}.snap-right{display:block;float:right}.clearfix::after{clear:both;display:table}audio,canvas,progress,video{display:inline-block}article,aside,details,figcaption,figure,footer,header,main,menu,nav,pre,section{display:block}.ellipsis{text-overflow:ellipsis;overflow-x:hidden}button,hr,input{overflow:visible}.no-ellipsis{text-overflow:clip;overflow-x:visible}.color-white{color:#fff!important}.color-black{color:#000!important}.color-blue{color:#5ca1eb!important}.color-accent{color:#3875ee!important}.color-cyan{color:#5bc0de!important}.color-green,.color-success{color:#52af52!important}.color-yellow{color:#f0b563!important}.color-red{color:#e07470!important}.color-purple{color:#996599!important}.color-orange{color:#dc881f!important}.color-light{color:#aaafbd!important}.color-pink{color:#ff6fbc!important}.color-brown{color:#8a4c42!important}.color-gray-base{color:#17191e!important}.color-gray-darkest{color:#292c35!important}.color-gray-darker{color:#383d49!important}.color-gray-dark{color:#596175!important}.color-gray{color:#7e879c!important}.color-gray-light{color:#aaafbd!important}.color-gray-lighter{color:#e3e5ea!important}code,legend,pre code{color:inherit}.bg-blue{background-color:#5ca1eb!important}.bg-accent{background-color:#3875ee!important}.bg-cyan{background-color:#5bc0de!important}.bg-green{background-color:#52af52!important}.bg-green-pale{background-color:#34793c!important}.bg-yellow{background-color:#f0b563!important}.bg-red{background-color:#e07470!important}.bg-purple{background-color:#996599!important}.bg-purple-dark{background-color:#6736a0!important}.bg-pink{background-color:#ff6fbc!important}.bg-orange{background-color:#dc881f!important}.bg-ice{background-color:#9cbed3!important}.bg-ice-mid{background-color:#9aaec3!important}.bg-ice-dark{background-color:#788EA3!important}.bg-ice-blue{background-color:#465c84!important}.bg-gray{background-color:#7e879c!important}.bg-gray-light{background-color:#aaafbd!important}.bg-gray-dark{background-color:#596175!important}.bg-gray-darker{background-color:#383d49!important}.bg-brown{background-color:#8a4c42!important}a,table{background-color:transparent}.svg-fill-blue svg{fill:#5ca1eb!important}.svg-fill-blue-pale svg{fill:#4f5e84!important}.svg-fill-accent svg{fill:#3875ee!important}.svg-fill-cyan svg{fill:#5bc0de!important}.svg-fill-green svg{fill:#52af52!important}.svg-fill-green-pale svg{fill:#34793c!important}.svg-fill-yellow svg{fill:#f0b563!important}.svg-fill-red svg{fill:#e07470!important}.svg-fill-purple svg{fill:#996599!important}.svg-fill-purple-pale svg{fill:#7f58ab!important}.svg-fill-purple-dark svg{fill:#6736a0!important}.svg-fill-pink svg{fill:#ff6fbc!important}.svg-fill-orange svg{fill:#dc881f!important}.svg-fill-gray svg{fill:#7e879c!important}.svg-fill-gray-dark svg{fill:#596175!important}.svg-fill-ice-blue svg{fill:#465c84!important}.svg-fill-brown svg{fill:#8a4c42!important}.svg-fill-black svg{fill:#000!important}.opacity-full{opacity:1}.opacity-xl{opacity:.8}.opacity-lg{opacity:.65}.opacity-md{opacity:.5}.opacity-sm{opacity:.3}.opacity-xs{opacity:.1}/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */h1{margin:.67em 0}figure{margin:1em 40px}hr{box-sizing:content-box}.container,.container-boxed,legend{box-sizing:border-box}a{-webkit-text-decoration-skip:objects}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}audio:not([controls]){display:none;height:0}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:ButtonText dotted 1px}fieldset{padding:.35em .75em .625em}legend{display:table;white-space:normal}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.docma-info,.hljs-emphasis,.param-info,.symbol-meta,blockquote{font-style:italic}summary{display:list-item}[hidden],template{display:none}table{border-collapse:collapse;border-spacing:0}caption{padding-top:8px;padding-bottom:8px;color:#aaafbd}.table{margin-bottom:24px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.5;vertical-align:top;border-top:1px solid #e1e7ea}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #e1e7ea;font-size:15.5px}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #e1e7ea}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #e1e7ea}.table-bordered>tbody>td,.table-bordered>tbody>th,.table-bordered>thead>td,.table-bordered>thead>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#e1e7ea}pre,pre code{background-color:transparent}table col[class*=col-]{position:static;float:none;display:table-column}table td[class*=col-],table th[class*=col-]{position:static;float:none;display:table-cell}.container,.container-boxed,.nav-spacer,body.static-navbar .navbar{position:relative}.table-responsive{overflow-x:auto;min-height:.01%}@media screen and (max-width:768px){.table-responsive{width:100%;margin-bottom:18px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #e1e7ea}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}code,kbd,pre,samp{font-family:"Overpass Mono",Menlo,Monaco,Consolas,monospace,"Courier New";font-size:15.5px}.navbar-brand .navbar-title,.navbar-list>li,.sidebar-header>.sidebar-brand span.sidebar-title{font-family:"Fira Sans","Helvetica Neue",Helvetica,Arial,sans-serif}code{padding:2px 5px 3px;font-size:90%;background-color:rgba(238,240,244,.74);border-radius:3px}pre{padding:0;margin:0 0 15px;font-size:15.5px;line-height:1.5;word-break:keep-all;word-wrap:inherit;color:#596175;border:0;border-radius:4px;overflow:auto;overflow-x:scroll}pre code{padding:15px 25px!important;font-size:85.4%;white-space:unset;border-radius:0}pre code.options{padding:15px 25px 0!important}.code-delim{color:#cfd3de}.pre-scrollable{max-height:340px;overflow-y:scroll}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:2px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;box-shadow:none}.container{padding:0 55px;margin:0 auto}.container-boxed{max-width:960px!important;padding:0}@media screen and (max-width:1050px){.container-boxed{padding:0 55px}}.row{padding:0;margin:0}.row:after,.row:before{display:table}.col{display:block;float:left;margin:1% 0 1% 4%}.col:first-child{margin-left:0}.span-2{width:64%}.span-1{width:31.5%}.span-half{width:47.5%}@media only screen and (max-width:768px){.col{margin:1% 0}.span-1,.span-2,.span-3,.span-half{width:100%}}body.static-navbar{padding-top:0!important}.nav-spacer{display:block;height:50px;visibility:hidden}.nav-overlay,.navbar{position:fixed;width:100%;display:block;top:0;left:0}.nav-arrow{margin-left:6px}.nav-overlay{bottom:0;right:0;height:100%;overflow:scroll;background-color:rgba(23,25,30,.5);z-index:-1;opacity:0;-webkit-transition:opacity .2s,z-index 0s;transition:opacity .2s,z-index 0s}.nav-overlay.toggled{z-index:999997;opacity:1}.navbar{background-color:#fff;z-index:999998;user-select:none;box-shadow:0 1px 30px 10px rgba(0,0,0,.02);border-bottom:2px solid rgba(0,0,0,.05);height:52px}.navbar>.navbar-inner{display:block;position:relative;white-space:nowrap}.navbar a,.navbar a:focus,.navbar a:hover{text-decoration:none!important}.navbar-brand{display:inline-table;position:absolute;float:left;margin:0 24px 0 0;z-index:9;height:100%!important}.navbar-brand .navbar-logo{display:table-cell;position:relative;height:38px;padding:0;margin:6px 9px 0 0;width:auto}.navbar-brand .navbar-title{display:table-cell;position:relative;margin:auto 0 0;height:50px;line-height:1em;vertical-align:middle;font-weight:700;font-size:18px;letter-spacing:.03em}.navbar-brand .navbar-title a{display:inline-block;white-space:normal!important;max-width:180px;padding-top:4px;text-decoration:none;color:#4e5566}.navbar-brand .navbar-title a:hover{color:#17191e}.navbar-menu{display:inline-table;position:relative;float:right;height:50px;overflow-y:visible;max-width:100%;z-index:8}.navbar-list{display:block;position:relative;margin:0!important;padding:0!important;list-style:none;white-space:nowrap}.navbar-list>li{display:inline-table;position:relative;height:50px;background-color:#fff}.navbar-list>li:hover>a{background-color:#f5f5f7;color:#010101}.navbar-list>li.dropdown>ul>li>a,.navbar-list>li>a{color:#4e5566;cursor:pointer;white-space:nowrap;text-decoration:none}.navbar-list>li>a{display:table-cell;position:relative;padding:4px 21px 0;height:50px;border-right:1px dashed rgba(40,44,53,.1);vertical-align:middle;font-weight:500;z-index:3}.navbar-list>li>a span.nav-label{margin-left:6px}.navbar-list>li:last-child>a{border-right:0 none!important}.navbar-list>li.dropdown{margin:0;padding:0;list-style:none;height:50px}.navbar-list>li.dropdown:hover{overflow:visible}.navbar-list>li.dropdown:hover>ul{display:block;margin-top:50px;opacity:1;height:auto;-webkit-transition:margin-top .2s ease-out,opacity .2s ease-out;transition:margin-top .2s ease-out,opacity .2s ease-out}.navbar-list>li.dropdown:hover>ul>li{height:30px;opacity:1}.navbar-list>li.dropdown:hover>ul>li.divider{height:1px;margin:11px 0!important;opacity:1}.navbar-list>li.dropdown>ul{z-index:1;display:block;position:absolute;width:auto;top:0;left:0;list-style:none;line-height:1.6em;padding:12px;margin:1px 0 0;background-color:#fff;box-shadow:0 6px 12px rgba(0,0,0,.175);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;border-bottom-left-radius:4px;border-bottom-right-radius:4px;border:1px solid rgba(33,37,44,.1);opacity:0;-webkit-transition:opacity .15s ease-out,top .2 ease-in;transition:opacity .15s ease-out,top .2 ease-in}.navbar-list>li.dropdown>ul>li{border-radius:3px;height:0;opacity:0;-webkit-transition:height .1s ease-out;transition:height .1s ease-out}.navbar-list>li.dropdown>ul>li>a{display:inline-block;width:100%;padding:3px 12px}.navbar-list>li.dropdown>ul>li:hover{background-color:#f5f5f7}.navbar-list>li.dropdown>ul>li:hover>a{color:#010101}.navbar-list>li.dropdown>ul>li.divider{height:0;margin:0!important;border-radius:0!important;background-color:rgba(36,39,47,.1)!important;cursor:default!important}li.dropdown>ul>li>a>code{background-color:#f5f5f7!important}.navbar-menu-btn{display:none;position:absolute;top:6px;right:55px;height:38px;width:38px;border-radius:38px;cursor:pointer;-webkit-transition:all .2s ease;transition:all .2s ease}.navbar-menu-btn:hover{background-color:#f5f5f7}.navbar-menu-btn:active,.navbar-menu-btn:focus{outline:0}.navbar-menu-btn svg.fa-bars{display:block;position:absolute;color:#17191e;margin:8px 0 0 9px;opacity:1}.navbar-menu-btn svg.fa-times{display:block;position:absolute;color:#fff;margin:11px 0 0 13px;opacity:0}.navbar-menu-btn.toggled{background-color:#17191e!important}.navbar-menu-btn.toggled svg.fa-bars{color:#fff;opacity:0}.navbar-menu-btn.toggled svg.fa-times{opacity:1}.navbar-menu.toggled{height:300px!important;opacity:1!important;overflow-y:scroll!important}.hide-navbar-menu,.navbar-menu.break{height:0;opacity:0;overflow-y:hidden}.navbar-menu.toggled .navbar-list{margin-top:0!important}.hide-navbar-menu .navbar-list,.navbar-menu.break .navbar-list{margin-top:-350px}.navbar-menu-btn.break{display:block}.navbar-menu.break{display:block;position:absolute;left:55px;right:55px;top:50px;margin-right:0!important;max-width:100%;box-shadow:0 6px 12px rgba(0,0,0,.175);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;background-color:#fff;-webkit-transition:all .2s ease-out;transition:all .2s ease-out;border-bottom-left-radius:6px;border-bottom-right-radius:6px}ul.navbar-list.break{display:block;position:relative;margin-bottom:0!important;-webkit-transition:all .2s ease-out;transition:all .2s ease-out}ul.navbar-list.break>li{display:table;float:none;width:100%;border-bottom:1px solid rgba(47,51,62,.1);height:auto!important}ul.navbar-list.break>li>a{display:table-cell;border-right:none;padding:0 30px;background-color:#f9f9f9}ul.navbar-list.break>li.dropdown{margin:0;padding:0;list-style:none;height:auto!important}ul.navbar-list.break>li.dropdown:hover>ul>li,ul.navbar-list.break>li.dropdown>ul>li{height:auto;opacity:1}ul.navbar-list.break>li.dropdown>a{display:block;line-height:50px;border-bottom:1px solid rgba(47,51,62,.1)}ul.navbar-list.break>li.dropdown:hover{overflow:visible}ul.navbar-list.break>li.dropdown:hover>ul{display:block;margin-top:0;opacity:1;height:auto}ul.navbar-list.break>li.dropdown>ul{display:block;position:relative;width:auto;margin:0 0 0 30px!important;box-shadow:0 0 0;border-radius:0;border:0;border-left:1px dashed rgba(40,44,53,.1);opacity:1;-webkit-transition:none;transition:none}ul.navbar-list.break>li.dropdown>ul>li.divider{height:1px;margin:11px 0!important;opacity:1}.navbar.dark{box-shadow:0 1px 1px 0 rgba(0,0,0,.2);border-bottom:0 none;height:50px;background-color:#282c35;color:#8890a2}.navbar.dark .navbar-title a{color:#D6DBE7}.navbar.dark .navbar-title a:hover{color:#fff}.navbar.dark .navbar-list>li{background-color:#282c35;color:#8890a2}.navbar.dark .navbar-list>li>a{color:#8890a2;border-right:1px dashed rgba(104,110,123,.1)}.navbar.dark .navbar-list>li:hover,.navbar.dark .navbar-list>li:hover>a{background-color:#3e4452;color:#fff}.navbar.dark .navbar-list>li.dropdown>ul{color:#4e5566}.navbar.dark .navbar-menu-btn:hover{background-color:#3e4452}.navbar.dark .navbar-menu-btn:hover svg.fa-bars{color:#fff}.navbar.dark .navbar-menu-btn svg.fa-bars{color:#8890a2}.navbar.dark .navbar-menu-btn svg.fa-times,.navbar.dark .navbar-menu-btn.toggled svg.fa-bars{color:#fff}.navbar.dark .navbar-menu-btn.toggled{background-color:#17191e!important}.navbar.dark .navbar-menu.break,.navbar.dark ul.navbar-list.break>li{background-color:#fff}.navbar.dark ul.navbar-list.break>li:hover>a{background-color:#f5f5f7;color:#010101}.navbar.dark ul.navbar-list.break>li>a{background-color:#f9f9f9}.symbol{font-size:20px}.symbol a{position:relative;text-decoration:none}.symbol a:hover{text-decoration:none}.symbol a:hover svg{opacity:.6}.symbol a svg{display:inline-block;position:absolute;font-size:1em;line-height:1em;margin-left:-1.3em;margin-top:.25em;opacity:.15}code.symbol-name{font-size:85.4%;font-weight:700;color:#050607}code.symbol-name .def-val,span.symbol-sep{color:#aaafbd;font-weight:400}span.symbol-sep{background-color:transparent;font-size:20px;padding-left:5px}code.symbol-type{color:#7e879c;font-size:16px;font-weight:400;background-color:transparent}code.symbol-type a:focus,code.symbol-type a:hover{text-decoration:underline}.symbol-meta{font-size:13px!important;text-align:right;padding-bottom:0;margin-bottom:0;color:#7e879c}.symbol-container{padding-top:50px;margin-top:-50px;font-size:16px}.symbol-container .symbol-heading .symbol{padding:10px 0}.symbol-container .symbol-definition{padding:5px 0}.symbol-container .symbol-definition .symbol-info>p{margin:0}.symbol-container .symbol-definition .symbol-info>p:last-of-type{margin-bottom:10px}.symbol-container .symbol-definition>p{margin:0 0 15px}.symbol-container .symbol-definition p+table{margin-top:20px}.symbol-container .symbol-definition .table td:first-child{white-space:nowrap}.symbol-container .symbol-definition .table td:last-child{width:auto}.symbol-container .symbol-definition .caption{display:inline-block!important;min-width:80px}.boxed,.symbol-badge{display:inline-block}.boxed{font-size:12px;letter-spacing:.04em;color:#fff;padding:2px 6px 0;border-radius:2px;margin:-2px 3px 0 0;vertical-align:middle;background-color:#d5d8df}ul.param-list{margin-bottom:25px!important}ul.param-list>li{padding-top:5px;margin-bottom:15px}ul.param-list>li .param-meta>span>code:first-child{font-size:97%}ul.param-list>li .param-meta>span>code:last-child{padding:3px 5px}ul.param-list>li .param-meta .param-info-box{float:right}ul.param-list>li .param-desc{margin-top:10px;margin-left:-20px;padding:10px 20px 7px;border-top:1px solid #eef0f5!important;background:#fbfbfb;border-bottom-left-radius:3px;border-bottom-right-radius:3px}ul.param-list>li .param-desc p:last-of-type{margin:0!important}.param-info{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.param-info.required{background:#e07470;margin-right:7px}.param-info.optional{background:#aaafbd;margin-right:7px}.param-info.default,.param-info.value{background:0 0!important;color:#7e879c!important;font-size:15px}.param-info.default+code,.param-info.value+code{margin:0 12px 0 3px}.symbol-def-val code{padding:2px 7px 3px;color:#17191e!important;font-weight:700}.symbol-badge{position:relative;width:25px;height:25px;opacity:.65;margin-left:-2px}.symbol-badge>span{position:absolute;display:block;font-family:Arial,sans-serif;font-size:9.5px;color:#fff;width:100%;line-height:25px;text-indent:0!important;text-align:center;left:0;top:0;z-index:2}.symbol-badge>svg{position:absolute;display:block;width:25px!important;height:25px!important;left:0;top:0;z-index:1;fill:#000}.symbol-badge>svg.svg-inline--fa{width:21.01px!important;height:21.01px!important;margin:1px 0 0 2px;padding:0}.symbol-badge>div.badge-scope-circle{position:absolute;top:-2px;left:-1px;width:10px;height:10px;border-radius:10px;border:2px solid #1e2128!important;background-color:#e07470;z-index:2}.symbol-badge.badge-str>span{font-weight:700;font-size:18px!important;line-height:25px!important}.badge-scope-btn{position:absolute;width:11px;height:11px;border-radius:11px;border:1px solid #1e2128!important;background-color:#e07470;z-index:2;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;opacity:.3}.symbol-badge.badge-btn,.symbol-badge.badge-btn>span,.symbol-badge.badge-btn>svg{width:22px!important;height:22px!important}.symbol-badge.badge-btn,img.item-tree-line{-moz-user-select:none;-ms-user-select:none}.badge-scope-btn.active,.badge-scope-btn:hover{opacity:1}.symbol-badge.badge-btn{display:inline-block;position:relative;margin-right:3px;white-space:nowrap;-webkit-user-select:none;user-select:none;cursor:pointer;opacity:.3}.symbol-badge.badge-btn>span{font-size:9px!important;line-height:22px!important;margin-left:-.5px}.symbol-badge.badge-btn.active,.symbol-badge.badge-btn:hover{opacity:1}img.item-tree-line{-webkit-user-select:none;user-select:none;vertical-align:top;margin-left:-2.2px}.sidebar-header,.sidebar-item{-moz-user-select:none;-ms-user-select:none}input[type=search]:-moz-placeholder{color:#8b93a6}input[type=search]::-webkit-input-placeholder{color:#8b93a6}.symbol-memberof{display:inline-block;width:auto;max-width:300px;overflow-x:hidden;vertical-align:middle}.symbol-memberof.no-width{max-width:0}#sidebar-toggle{display:block;position:fixed;z-index:9999999;top:0;left:0;width:50px;text-align:center;line-height:50px;font-size:20px;cursor:pointer}#sidebar-toggle svg.fa-bars{display:inline-block;margin-top:13px;color:#636982;opacity:.4}#sidebar-toggle:hover svg.fa-bars{opacity:1}#sidebar-toggle.toggled svg.fa-bars{color:#636982}#sidebar-toggle.toggled:hover svg.fa-bars{color:#fff;opacity:.85}.sidebar-item{opacity:1;-webkit-user-select:none;user-select:none}.sidebar-item.hidden{height:0;opacity:0;overflow:hidden}.sidebar-item .item-inner{height:36px}.sidebar-item .item-inner .item-label{display:inline-block;text-indent:0!important}.sidebar-item .item-inner .item-label.crop-to-fit{width:210px!important;overflow-x:hidden}.sidebar-item .item-inner .item-label.crop-to-fit div.inner{display:block;white-space:nowrap;overflow-x:hidden;width:auto;-webkit-transition:margin-left .2s ease;transition:margin-left .2s ease}.sidebar-item .item-inner .item-label .edge-shadow{position:absolute;background:0 0;top:0;right:0;width:50px;height:36px;box-shadow:inset -50px 0 40px -7px #1e2128;z-index:9;-webkit-transition:all .15s ease;transition:all .15s ease}.sidebar-item .item-inner .item-label div.inner{display:inline}.sidebar-item .item-inner .item-label div.inner span{display:inline-block;position:relative;height:36px!important;line-height:36px!important;vertical-align:middle;font-size:inherit;overflow:hidden}.sidebar-item .symbol-badge{position:absolute;top:6px;margin-left:-2px}.sidebar-item:hover .symbol-badge{opacity:1}.sidebar-item:hover .item-label.crop-to-fit div.inner{text-overflow:clip;overflow-x:visible}.sidebar-header{display:block;position:absolute;top:0;left:0;width:300px;height:130px;background-color:#1e2128;border-bottom:2px solid rgba(28,31,37,.7)!important;-webkit-user-select:none;user-select:none}.sidebar-header>.sidebar-brand{display:table;position:relative;height:49px;background-color:#1b1f25;border-bottom:1px solid rgba(0,0,0,.04)!important;padding-left:55px;width:100%}.sidebar-header>.sidebar-brand .sidebar-logo{display:table-cell;position:relative;height:38px;width:auto;margin:6px 9px 0 0}.sidebar-header>.sidebar-brand span.sidebar-title{position:relative;display:table-cell;width:100%;margin:auto 0 0 50px;font-size:18px;font-weight:700;letter-spacing:.03em;height:50px;line-height:1em;vertical-align:middle;color:#D6DBE7}.sidebar-header>.sidebar-brand span.sidebar-title>a{display:inline-block;margin-top:4px;text-decoration:none;color:#D6DBE7;width:180px}.sidebar-header>.sidebar-brand span.sidebar-title>a:hover{color:#fff}.sidebar-header>.sidebar-toolbar{display:block;position:relative;text-align:center;height:30px;overflow:hidden;margin-top:6px}.toolbar-buttons,.toolbar-kind-filters,.toolbar-scope-filters{display:inline-block;padding:0;position:relative;white-space:nowrap}.toolbar-kind-filters{margin:0 6px 0 0;text-align:center;vertical-align:middle}.toolbar-scope-filters{width:32px;height:32px;vertical-align:top}.toolbar-buttons{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;top:-1px}.toolbar-buttons span{color:#fff;opacity:.5;cursor:pointer}.toolbar-buttons span:hover{opacity:1}.sidebar-search{margin:0 20px;padding:20px 0 10px;position:relative}.sidebar-search #txt-search{outline:0!important;font-size:14px;width:100%;height:38px;margin-bottom:0;padding:2px 25px 0 30px;border-radius:36px;text-indent:0!important;background-color:#2b2e38;color:#8b93a6;border:1px solid #2b2e39;-webkit-box-shadow:inset 12px 2px 5px rgba(0,0,0,.1);box-shadow:inset 12px 2px 5px rgba(0,0,0,.1);transition-delay:.1s}.sidebar-search #txt-search:focus{background-color:#fff;color:#596175;-webkit-box-shadow:inset 1px 0 2px rgba(0,0,0,.5);box-shadow:inset 1px 0 2px rgba(0,0,0,.5)}.sidebar-search .sidebar-search-icon{position:absolute;top:22px;left:10px;line-height:36px;color:#8b93a6;z-index:999}.sidebar-search .sidebar-search-clean{position:absolute;top:21px;right:6px;line-height:36px;color:#8b93a6;z-index:999;cursor:pointer;text-indent:0!important}.sidebar-search .sidebar-search-clean:hover svg{color:#191c20}.search-query:focus+button{z-index:3}.sidebar-nav-container{display:block;position:absolute;overflow-y:auto;top:130px;bottom:0;left:0;right:0}ul.sidebar-nav,ul.sidebar-nav ul{display:block;position:relative;overflow:visible;list-style:none;padding:0}ul.sidebar-nav{padding-bottom:15px}ul.sidebar-nav ul{margin:0!important;height:auto;max-height:10000px;overflow:hidden;-webkit-transition:all .3s ease;transition:all .3s ease}ul.sidebar-nav ul.no-height{max-height:0}.sidebar-nav>.sidebar-brand{height:50px;font-size:18px;line-height:50px;background-color:#2b2e39}.sidebar-nav>.sidebar-brand a{color:#8b93a6}.sidebar-nav>.sidebar-brand a:hover{color:#fff;background:0 0}.sidebar-nav li{text-indent:20px;line-height:36px!important;white-space:nowrap}.sidebar-nav li>a{display:block;text-decoration:none;color:#aaafbd;height:36px}.sidebar-nav li>a:hover{text-decoration:none;color:#fff;background:#131519}.sidebar-nav li>a:hover .badge-scope-circle{border-color:#131519!important}button.btn,hr{border:0}.sidebar-nav li>a:hover .edge-shadow{box-shadow:inset 0 0 0 0 transparent!important}.sidebar-nav li>a:active,.sidebar-nav li>a:focus{text-decoration:none;outline:0}.hljs-link,a:focus,a:hover{text-decoration:underline}*,button,select{outline:0!important}.sidebar-nav li div.chevron{position:absolute;display:block;right:0;height:36px;width:36px;line-height:36px;color:rgba(255,255,255,.35);cursor:pointer;z-index:9}.sidebar-nav li div.chevron svg{margin-left:-12px;-webkit-transition:all .3s ease;transition:all .3s ease;-webkit-transform-origin:center center;-moz-transform-origin:center center;-ms-transform-origin:center center;transform-origin:center center;-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.sidebar-nav li div.chevron.members-folded svg{-webkit-transform-origin:center center;-moz-transform-origin:center center;-ms-transform-origin:center center;transform-origin:center center;-webkit-transform:rotate(0);-moz-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0)}.sidebar-nav li div.chevron:hover svg{color:#fff}.sidebar-nav li div.chevron:hover~a{background-color:rgba(0,0,0,.35)}.sidebar-nav li div.chevron:hover~a .edge-shadow{background-color:rgba(0,0,0,0);box-shadow:inset 0 0 0 0 transparent!important}.sidebar-nav li div.chevron:hover~ul{background-color:rgba(0,0,0,.2)}.sidebar-nav li div.chevron:hover~ul .edge-shadow{background-color:rgba(24,27,32,.35);box-shadow:inset -50px 0 40px -7px rgba(24,27,32,.2)!important}#wrapper{display:block;position:relative;margin-left:0}#wrapper.toggled{margin-left:300px}#wrapper.toggled #sidebar-wrapper{display:block;width:300px}#wrapper.toggled #page-content-wrapper{position:absolute;margin-right:-300px}#sidebar-wrapper{position:fixed;display:block;width:0;top:0;bottom:0;left:0;overflow-y:hidden;background-color:#1e2128;font-family:"Overpass Mono",Menlo,Monaco,Consolas,monospace,"Courier New";font-size:13px;z-index:999999}#page-content-wrapper{width:100%;position:relative;background:#fff;margin-right:0}@media print,(max-width:768px){#sidebar-wrapper,#wrapper.toggled #sidebar-wrapper{width:0}#sidebar-toggle{display:none}#wrapper,#wrapper.toggled{margin-left:0}#wrapper.toggled #page-content-wrapper{position:relative;margin-right:0}#page-content-wrapper{position:absolute}}.zebra-bookmark,a,p{position:relative}.tippy-tooltip.zebra-theme{background-color:#2b2e39;color:#8b93a6;box-shadow:0 1px 3px rgba(0,0,0,.25)}.hljs{display:block;overflow-x:auto;padding:.5em;color:#cacfd8;background:#282c34}.hljs-comment,.hljs-quote{color:#737a88;font-style:italic}.hljs-doctag,.hljs-formula,.hljs-keyword{color:#c678dd}.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#e06c75}.hljs-literal{color:#56b6c2}.hljs-attribute,.hljs-regexp{color:#7987c3}.hljs-addition,.hljs-meta-string,.hljs-string{color:#98c379}.hljs-built_in,.hljs-class .hljs-title{color:#e6c07b}.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#d19a66}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#61aeee}.hljs-strong{font-weight:500}html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent;-webkit-font-smoothing:subpixel-antialiased}body,html{font-family:"Fira Sans","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px;line-height:1.5;background-color:#fff!important;color:#292c35;padding:0;margin:0;height:100%;min-height:100%}*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}button{font-size:16px!important}button::-moz-focus-inner{border:0!important}button.btn-block{letter-spacing:.03em;font-size:18px!important}div,img{border:0!important}select{-webkit-appearance:menulist-button;background:#fff!important}a{color:#2f87e5;text-decoration:none}a:focus,a:hover{color:#196dc8;text-decoration-color:#13559b!important}.zebra-bookmark,.zebra-bookmark:hover{text-decoration:none}a:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}hr{height:0;border-top:1px solid rgba(0,0,0,.1);border-bottom:1px solid rgba(255,255,255,.3);margin:10px 0 20px}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit;-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;z-index:0}a,ol,p,table,ul{z-index:1}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:70%;font-weight:400;line-height:1;color:#aaafbd}.h1,h1{font-size:36px;margin-top:36px;margin-bottom:13.33px}.h2,h2{font-size:32px;margin-top:32px;margin-bottom:11.85px}.h3,h3{font-size:26px;margin-top:26px;margin-bottom:9.63px}.h4,h4{font-size:21px;margin-top:21px;margin-bottom:7.78px}.h5,h5{font-size:16px;margin-top:16px;margin-bottom:5.93px}.h6,h6{font-size:13px;margin-top:13px;margin-bottom:4.81px}p{margin:0 0 15px}ol>li>p,ul{margin:5px 0}td>p{margin:0}img{vertical-align:middle}.well,details .details-content{background-color:#f9f9f9;border-radius:3px}blockquote{padding:10px 12px;margin:0 0 17px;font-size:1em;border-left:5px solid #f0b563;color:#576075;background-color:#f9f9f9;border-top-right-radius:3px;border-bottom-right-radius:3px}.well>p:last-of-type,blockquote>p:last-of-type{margin-bottom:0}.well{padding:20px}details{padding-top:60px;margin-top:-60px}details>summary{cursor:pointer;user-select:none;margin-bottom:10px}details .details-content{padding:12px 20px;border-top:3px solid #dadce2!important;margin-bottom:20px}details .details-content p:last-of-type{margin:0}details .details-content pre,details .details-content table{margin-top:10px}details .details-content :not(pre)>code{background-color:#e8ebee}details .details-content thead{background-color:#fff}details .details-content blockquote{background-color:#f4f4f4}.zebra-bookmark:hover svg{opacity:.6}.zebra-bookmark svg{display:inline-block;position:absolute;font-size:.7em;line-height:.7em;margin-left:-1.3em;margin-top:.175em;opacity:.15}.zebra-bookmark:before{content:" ";display:block;visibility:hidden;height:50px;margin-top:-50px}.docma-info{display:inline-block;font-size:12px;letter-spacing:.04em;margin-bottom:25px;z-index:2}#docma-content{margin-top:17px} 2 | -------------------------------------------------------------------------------- /docs/examples/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/home/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/img/grumpy-badge.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Grumpy 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /docs/img/grumpy-icon-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidenybai/grumpy/55343392b9b024deadf0a1ca7bb0cfa0e5b4165b/docs/img/grumpy-icon-light.png -------------------------------------------------------------------------------- /docs/img/grumpy-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidenybai/grumpy/55343392b9b024deadf0a1ca7bb0cfa0e5b4165b/docs/img/grumpy-icon.png -------------------------------------------------------------------------------- /docs/img/grumpy-npm-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidenybai/grumpy/55343392b9b024deadf0a1ca7bb0cfa0e5b4165b/docs/img/grumpy-npm-light.png -------------------------------------------------------------------------------- /docs/img/grumpy-npm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidenybai/grumpy/55343392b9b024deadf0a1ca7bb0cfa0e5b4165b/docs/img/grumpy-npm.png -------------------------------------------------------------------------------- /docs/img/grumpy-npm.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | Grumpy 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /docs/img/grumpy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidenybai/grumpy/55343392b9b024deadf0a1ca7bb0cfa0e5b4165b/docs/img/grumpy.png -------------------------------------------------------------------------------- /docs/img/grumpy.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /docs/img/tree-deep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidenybai/grumpy/55343392b9b024deadf0a1ca7bb0cfa0e5b4165b/docs/img/tree-deep.png -------------------------------------------------------------------------------- /docs/img/tree-first.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidenybai/grumpy/55343392b9b024deadf0a1ca7bb0cfa0e5b4165b/docs/img/tree-first.png -------------------------------------------------------------------------------- /docs/img/tree-folded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidenybai/grumpy/55343392b9b024deadf0a1ca7bb0cfa0e5b4165b/docs/img/tree-folded.png -------------------------------------------------------------------------------- /docs/img/tree-last.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidenybai/grumpy/55343392b9b024deadf0a1ca7bb0cfa0e5b4165b/docs/img/tree-last.png -------------------------------------------------------------------------------- /docs/img/tree-node.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidenybai/grumpy/55343392b9b024deadf0a1ca7bb0cfa0e5b4165b/docs/img/tree-node.png -------------------------------------------------------------------------------- /docs/img/tree-parent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidenybai/grumpy/55343392b9b024deadf0a1ca7bb0cfa0e5b4165b/docs/img/tree-parent.png -------------------------------------------------------------------------------- /docs/img/tree-space.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidenybai/grumpy/55343392b9b024deadf0a1ca7bb0cfa0e5b4165b/docs/img/tree-space.png -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Grumpy 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /docs/js/app.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Zebra Template for Docma - app.js 4 | * Copyright © 2019, Onur Yıldırım 5 | * SVG shapes: CC-BY 4.0 6 | */ 7 | var app=window.app||{};(function(){"use strict";app.svg={}; 8 | /** 9 | * @license 10 | * CC-BY 4.0, © Onur Yıldırım 11 | */var shapes={square:'',circle:'',diamond:'',pentagonUp:'',pentagonDown:'',octagon:'',hexagonH:'',hexagonV:''};shapes.pentagon=shapes.pentagonUp;shapes.hexagon=shapes.hexagonV;app.svg.shape=function(options){var opts=options||{};var shape=opts.shape||"square";var svg=shapes[shape];var cls="badge-"+shape;cls+=" svg-fill-"+(opts.color||"black");if(opts.addClass)cls+=" "+opts.addClass;svg=''+svg+"";var scopeCircle=opts.circleColor?'
':"";var dataKind=!opts.circleColor?' data-kind="'+opts.kind+'"':"";var title=(opts.title||"").toLowerCase();return'
"+scopeCircle+""+(opts.char||"-")+""+svg+"
"};function getFaHtml(title,color){return'
'+''+"
"}app.svg.warn=function(title){title=title||"Warning: Check your JSDoc comments.";return getFaHtml(title,"yellow")};app.svg.error=function(title){title=title||"Error: Check your JSDoc comments.";return getFaHtml(title,"red")}})(); 12 | /** 13 | * @license 14 | * Zebra Template for Docma - app.js 15 | * Copyright © 2019, Onur Yıldırım 16 | */ 17 | var app=window.app||{};(function(){"use strict";app.NODE_MIN_FONT_SIZE=9;app.NODE_MAX_FONT_SIZE=13;app.NODE_LABEL_MAX_WIDTH=210;app.RE_EXAMPLE_CAPTION=/^\s*(.*?)<\/caption>\s*/gi;app.NAVBAR_HEIGHT=50;app.SIDEBAR_WIDTH=300;app.SIDEBAR_NODE_HEIGHT=36;app.TOOLBAR_HEIGHT=30;app.TREE_NODE_WIDTH=25;var helper={};var templateOpts=docma.template.options;helper.toggleBodyScroll=function(enable){var overflow=enable?"auto":"hidden";$("body").css({overflow:overflow})};helper.capitalize=function(str){return str.split(/[ \t]+/g).map(function(word){return word.charAt(0).toUpperCase()+word.slice(1)}).join(" ")};helper.removeFromArray=function(arr,value){var index=arr.indexOf(value);if(index!==-1)arr.splice(index,1)};helper.addToArray=function(arr,value){var index=arr.indexOf(value);if(index===-1)arr.push(value)};helper.debounce=function(func,wait,immediate){var timeout;return function(){var context=this;var args=arguments;var later=function(){timeout=null;if(!immediate)func.apply(context,args)};var callNow=immediate&&!timeout;clearTimeout(timeout);timeout=setTimeout(later,wait);if(callNow)func.apply(context,args)}};helper.getCssNumVal=function($elem,styleName){return parseInt($elem.css(styleName),10)||0};helper.getScrollWidth=function($elem){return $elem.get(0).scrollWidth||$elem.outerWidth()||0};helper.fitSidebarNavItems=function($el,outline){outline=outline||templateOpts.sidebar.outline;var cropToFit=templateOpts.sidebar.itemsOverflow==="crop";if(cropToFit){var dMarginLeft="data-margin-"+outline;var $inner=$el.find(".inner");var savedMargin=$inner.attr(dMarginLeft);if(!savedMargin){var marginLeft=Math.round(app.NODE_LABEL_MAX_WIDTH-helper.getScrollWidth($inner));if(marginLeft>=0)marginLeft=0;$inner.attr(dMarginLeft,marginLeft+"px")}return}var dFontSize="data-font-"+outline;var savedSize=$el.attr(dFontSize);if(savedSize){$el.css("font-size",savedSize);return}var delay=templateOpts.sidebar.animations?210:0;setTimeout(function(){var spans=$el.find("span").addClass("no-trans");var f=app.NODE_MAX_FONT_SIZE;while($el.width()>app.NODE_LABEL_MAX_WIDTH&&f>=app.NODE_MIN_FONT_SIZE){$el.css("font-size",f+"px");f-=.2}$el.attr(dFontSize,f+"px");spans.removeClass("no-trans")},delay)};helper.colorOperators=function(str){return str.replace(/[.#~]/g,'$&').replace(/:/g,'$&')};helper.hasChildren=function(symbol){return symbol.$members&&!symbol.isEnum};helper.getScopeInfo=function(scope){var o={};var top=0;var left=0;var m=12;switch(scope){case"global":o.color="purple";break;case"static":o.color="accent";top=m;break;case"instance":o.color="green";left=m;break;case"inner":o.color="gray-light";top=m;left=m;break;default:o.color=null}var margin=top+"px 0 0 "+left+"px";o.title=scope||"";o.badge='
';return o};helper.getSymbolInfo=function(kind,scope,asButton){var title=scope||"";title+=" "+String(kind||"").replace("typedef","type");title=DocmaWeb.Utils.trimLeft(helper.capitalize(title));var svgOpts={title:title,addClass:asButton?"badge-btn":"",circleColor:helper.getScopeInfo(scope).color,kind:kind,scope:scope};switch(kind){case"class":svgOpts.char="C";svgOpts.color="green";svgOpts.shape="diamond";break;case"constructor":svgOpts.char="c";svgOpts.color="green-pale";svgOpts.shape="circle";break;case"namespace":svgOpts.char="N";svgOpts.color="pink";svgOpts.shape="pentagonDown";break;case"module":svgOpts.char="M";svgOpts.color="red";svgOpts.shape="hexagonH";break;case"constant":svgOpts.char="c";svgOpts.color="brown";svgOpts.shape="hexagonV";break;case"typedef":svgOpts.char="T";svgOpts.color="purple-dark";svgOpts.shape="hexagonV";break;case"global":svgOpts.char="G";svgOpts.color="purple-dark";svgOpts.shape="hexagonV";break;case"global-object":svgOpts.char="G";svgOpts.color="purple-dark";svgOpts.shape="hexagonV";break;case"global-function":svgOpts.char="F";svgOpts.color="accent";svgOpts.shape="circle";break;case"function":svgOpts.char="F";svgOpts.color="accent";svgOpts.shape="circle";break;case"method":svgOpts.char="M";svgOpts.color="cyan";svgOpts.shape="circle";break;case"property":svgOpts.char="P";svgOpts.color="yellow";svgOpts.shape="square";break;case"enum":svgOpts.char="e";svgOpts.color="orange";svgOpts.shape="pentagonUp";break;case"event":svgOpts.char="E";svgOpts.color="blue-pale";svgOpts.shape="octagon";break;case"member":svgOpts.char="m";svgOpts.color="ice-blue";svgOpts.shape="square";break;default:svgOpts.title="";svgOpts.char="•";svgOpts.color="black";svgOpts.shape="square"}return{kind:kind,scope:scope||"",char:svgOpts.char,badge:app.svg.shape(svgOpts)}};function getSymbolData(symbol){if(!symbol){return{kind:"Unknown",char:"",badge:app.svg.error()}}if(DocmaWeb.Utils.isClass(symbol))return helper.getSymbolInfo("class",symbol.scope);if(DocmaWeb.Utils.isConstant(symbol))return helper.getSymbolInfo("constant",symbol.scope);if(DocmaWeb.Utils.isTypeDef(symbol))return helper.getSymbolInfo("typedef",symbol.scope);if(DocmaWeb.Utils.isConstructor(symbol))return helper.getSymbolInfo("constructor",symbol.scope);if(DocmaWeb.Utils.isNamespace(symbol))return helper.getSymbolInfo("namespace",symbol.scope);if(DocmaWeb.Utils.isModule(symbol))return helper.getSymbolInfo("module",symbol.scope);if(DocmaWeb.Utils.isEnum(symbol))return helper.getSymbolInfo("enum",symbol.scope);if(DocmaWeb.Utils.isEvent(symbol))return helper.getSymbolInfo("event",symbol.scope);if(DocmaWeb.Utils.isProperty(symbol))return helper.getSymbolInfo("property",symbol.scope);if(DocmaWeb.Utils.isMethod(symbol))return helper.getSymbolInfo("method",symbol.scope);if(symbol.kind==="member")return helper.getSymbolInfo("member",symbol.scope);return helper.getSymbolInfo()}function getTreeLine(treeNode,addClass){var cls="item-tree-line";if(addClass)cls+=" "+addClass;if(treeNode==="parent")cls+=" item-tree-parent";return''}function getTreeLineImgs(levels,treeNode,hasChildren,lastNodeLevels){var imgs=[];if(hasChildren)imgs=[getTreeLine("parent","absolute")];if(treeNode==="first"){if(levels>1)return getTreeLineImgs(levels,"node",hasChildren)}else{imgs.unshift(getTreeLine(treeNode))}var deeps=[];if(levels>2){var i;for(i=2;i";labelMargin=25}else{labelMargin=31}var labelStyle=' style="margin-left: '+labelMargin+'px !important; "';var itemTitle=errMessage?' title="'+errMessage+'"':"";return'
'+treeImages+badge+'
"+'
'+'
'+name+"
"+"
"+"
"}function getSidebarNavItem(symbol,parentSymbol,isLast,lastNodeLevels){var treeNode=parentSymbol?isLast?"last":"node":"first";var id=dust.filters.$id(symbol);var keywords=DocmaWeb.Utils.getKeywords(symbol);var symbolData=getSymbolData(symbol);var badge=templateOpts.sidebar.badges===true?symbolData.badge||"":typeof templateOpts.sidebar.badges==="string"?templateOpts.sidebar.badges:" • ";var hasChildren=helper.hasChildren(symbol);var innerHTML=getSidebarNavItemInner(badge,symbol.$longname,treeNode,hasChildren,lastNodeLevels);var chevron="";if(hasChildren){chevron='
'}return chevron+''+innerHTML+""}helper.buildSidebarNodes=function(symbolNames,symbols,parentSymbol,lastNodeLevels){lastNodeLevels=lastNodeLevels||0;symbols=symbols||docma.documentation;var items=[];symbols.forEach(function(symbol,index){if(symbolNames.indexOf(symbol.$longname)===-1)return;if(DocmaWeb.Utils.isConstructor(symbol)&&symbol.hideconstructor===true){return}var isLast=index===symbols.length-1;var navItem=getSidebarNavItem(symbol,parentSymbol,isLast,lastNodeLevels);var currentLastLevel=isLast?DocmaWeb.Utils.getLevels(symbol):lastNodeLevels;var members="";if(helper.hasChildren(symbol)){members='
    '+helper.buildSidebarNodes(symbolNames,symbol.$members,symbol,currentLastLevel).join("")+"
"}items.push("
  • "+navItem+members+"
  • ")});return items};var RE_KIND=/(?:\bkind:\s*)([^, ]+(?:\s*,\s*[^, ]+)*)?/gi;var RE_SCOPE=/(?:\bscope:\s*)([^, ]+(?:\s*,\s*[^, ]+)*)?/gi;function SidebarSearch(){this.reset()}SidebarSearch.prototype.reset=function(){this.scope=[];this.kind=[];this.keywords=[]};SidebarSearch.prototype.parseKeywords=function(string){var kw=(string||"").replace(RE_KIND,"").replace(RE_SCOPE,"").trim().replace(/\s+/," ");this.keywords=kw?kw.split(" "):[];return this};SidebarSearch.prototype.parse=function(string){if(!string){this.kind=[];this.scope=[];this.keywords=[];return this}var m=RE_KIND.exec(string);if(!m||m.length<2||!m[1]||m.indexOf("*")>=0){this.kind=[]}else{this.kind=m[1].split(",").map(function(k){return k.toLocaleLowerCase().trim()})}m=RE_SCOPE.exec(string);if(!m||m.length<2||!m[1]||m.indexOf("*")>=0){this.scope=[]}else{this.scope=m[1].split(",").map(function(s){return s.toLocaleLowerCase().trim()})}RE_KIND.lastIndex=0;RE_SCOPE.lastIndex=0;this.parseKeywords(string);return this};SidebarSearch.prototype.hasScope=function(scope){return this.scope.indexOf(scope)>=0};SidebarSearch.prototype.removeScope=function(scope){helper.removeFromArray(this.scope,scope)};SidebarSearch.prototype.addScope=function(scope){helper.addToArray(this.scope,scope)};SidebarSearch.prototype.hasKind=function(kind){return this.kind.indexOf(kind)>=0};SidebarSearch.prototype.removeKind=function(kind){helper.removeFromArray(this.kind,kind)};SidebarSearch.prototype.addKind=function(kind){helper.addToArray(this.kind,kind)};SidebarSearch.prototype.matchesAnyKeyword=function(keywords){return this.keywords.some(function(kw){return keywords.indexOf(kw.toLocaleLowerCase())>=0})};SidebarSearch.prototype.toObject=function(){return{scope:this.scope,kind:this.kind,keywords:this.keywords}};SidebarSearch.prototype.toString=function(){var s="";if(Array.isArray(this.keywords)&&this.keywords.length>0){s=this.keywords.join(" ")+" "}if(Array.isArray(this.scope)&&this.scope.length>0){s+="scope:"+this.scope.join(",")+" "}if(Array.isArray(this.kind)&&this.kind.length>0){s+="kind:"+this.kind.join(",")}return s.trim()};app.SidebarSearch=SidebarSearch;app.helper=helper})();(function(){"use strict";var templateOpts=docma.template.options;function dotProp(name,forSidebar){var re=/(.*)([.#~][\w:]+)/g,match=re.exec(name);if(!match)return''+name+"";if(forSidebar){var cls=templateOpts.sidebar.animations?" trans-all-ease-fast":"";return''+app.helper.colorOperators(match[1])+""+app.helper.colorOperators(match[2])+""}return''+app.helper.colorOperators(match[1])+''+app.helper.colorOperators(match[2])+""}docma.addFilter("$color_ops",function(name){return app.helper.colorOperators(name)}).addFilter("$dot_prop_sb",function(name){return dotProp(name,true)}).addFilter("$dot_prop",function(name){return dotProp(name,false)}).addFilter("$author",function(symbol){var authors=Array.isArray(symbol)?symbol:symbol.author||[];return authors.join(", ")}).addFilter("$type",function(symbol){if(DocmaWeb.Utils.isConstructor(symbol))return"";var opts={links:templateOpts.symbols.autoLink};if(symbol.kind==="function"){var returnTypes=DocmaWeb.Utils.getReturnTypes(docma.apis,symbol,opts);return returnTypes?returnTypes:""}var types=DocmaWeb.Utils.getTypes(docma.apis,symbol,opts);return types?types:""}).addFilter("$type_sep",function(symbol){if(DocmaWeb.Utils.isConstructor(symbol))return"";if(symbol.kind==="function")return"⇒";if(symbol.kind==="event"&&symbol.type)return"⇢";if(symbol.kind==="class")return":";if(!symbol.type&&!symbol.returns)return"";return":"}).addFilter("$param_desc",function(param){return DocmaWeb.Utils.parse(param.description||"")}).addFilter("$longname",function(symbol){if(typeof symbol==="string")return symbol;var nw=DocmaWeb.Utils.isConstructor(symbol)?"new ":"";return nw+symbol.$longname}).addFilter("$longname_params",function(symbol){var isCon=DocmaWeb.Utils.isConstructor(symbol),longName=app.helper.colorOperators(symbol.$longname);if(symbol.kind==="function"||isCon){var defVal,defValHtml="",nw=isCon?"new ":"",name=nw+longName+"(";if(Array.isArray(symbol.params)){var params=symbol.params.reduce(function(memo,param){if(param&¶m.name.indexOf(".")===-1){defVal=param.hasOwnProperty("defaultvalue")?String(param.defaultvalue):"undefined";defValHtml=param.optional?'='+defVal+"":"";var rest=param.variable?"...":"";memo.push(rest+param.name+defValHtml)}return memo},[]).join(", ");name+=params}return name+")"}return longName}).addFilter("$extends",function(symbol){var ext=Array.isArray(symbol)?symbol:symbol.augments;return DocmaWeb.Utils.getCodeTags(docma.apis,ext,{delimeter:", ",links:templateOpts.symbols.autoLink})}).addFilter("$returns",function(symbol){var returns=Array.isArray(symbol)?symbol:symbol.returns;return DocmaWeb.Utils.getFormattedTypeList(docma.apis,returns,{delimeter:"|",descriptions:true,links:templateOpts.symbols.autoLink})}).addFilter("$yields",function(symbol){var yields=Array.isArray(symbol)?symbol:symbol.yields;return DocmaWeb.Utils.getFormattedTypeList(docma.apis,yields,{delimeter:"|",descriptions:true,links:templateOpts.symbols.autoLink})}).addFilter("$emits",function(symbol){var emits=Array.isArray(symbol)?symbol:symbol.fires;return DocmaWeb.Utils.getEmittedEvents(docma.apis,emits,{delimeter:", ",links:templateOpts.symbols.autoLink})}).addFilter("$exceptions",function(symbol){var exceptions=Array.isArray(symbol)?symbol:symbol.exceptions;return DocmaWeb.Utils.getFormattedTypeList(docma.apis,exceptions,{delimeter:"|",descriptions:true,links:templateOpts.symbols.autoLink})}).addFilter("$tags",function(symbol){var openIce='',openIceDark='',openBlue='',openGreenPale='',openYellow='',openPurple='',openRed='',openPink='',openBrown='',close="",tagBoxes=[];if(DocmaWeb.Utils.isDeprecated(symbol)){tagBoxes.push(openYellow+"deprecated"+close)}if(DocmaWeb.Utils.isGlobal(symbol)&&!DocmaWeb.Utils.isConstructor(symbol)){tagBoxes.push(openPurple+"global"+close)}if(DocmaWeb.Utils.isStatic(symbol)){tagBoxes.push(openBlue+"static"+close)}if(DocmaWeb.Utils.isInner(symbol)){tagBoxes.push(openIceDark+"inner"+close)}if(DocmaWeb.Utils.isModule(symbol)){tagBoxes.push(openRed+"module"+close)}if(DocmaWeb.Utils.isConstructor(symbol)){tagBoxes.push(openGreenPale+"constructor"+close)}if(DocmaWeb.Utils.isNamespace(symbol)){tagBoxes.push(openPink+"namespace"+close)}if(DocmaWeb.Utils.isGenerator(symbol)){tagBoxes.push(openBlue+"generator"+close)}if(DocmaWeb.Utils.isPublic(symbol)===false){tagBoxes.push(openIceDark+symbol.access+close)}if(DocmaWeb.Utils.isReadOnly(symbol)){tagBoxes.push(openIceDark+"readonly"+close)}if(DocmaWeb.Utils.isConstant(symbol)){tagBoxes.push(openBrown+"constant"+close)}var tags=Array.isArray(symbol)?symbol:symbol.tags||[];var tagTitles=tags.map(function(tag){return openIce+tag.originalTitle+close});tagBoxes=tagBoxes.concat(tagTitles);if(tagBoxes.length)return"  "+tagBoxes.join(" ");return""}).addFilter("$navnodes",function(symbolNames){return app.helper.buildSidebarNodes(symbolNames).join("")}).addFilter("$get_caption",function(example){var m=app.RE_EXAMPLE_CAPTION.exec(example||"");return m&&m[1]?" — "+DocmaWeb.Utils.parseTicks(m[1])+"":""}).addFilter("$remove_caption",function(example){return(example||"").replace(app.RE_EXAMPLE_CAPTION,"")})})();var app=window.app||{};(function(){"use strict";var helper=app.helper;var templateOpts=docma.template.options;var $sidebarNodes,$btnClean,$txtSearch;var $wrapper,$sidebarWrapper,$sidebarToggle;var $nbmBtn,$navOverlay,$navbarMenu,$navbarBrand,$navbarInner,$navbarList;var $btnSwitchFold,$btnSwitchOutline;var $scopeFilters,$scopeFilterBtns,$kindFilters,$kindFilterBtns;var navbarMenuActuallWidth;var isFilterActive=false;var isItemsFolded=templateOpts.sidebar.itemsFolded;var isApiRoute=false;var SidebarSearch=app.SidebarSearch;var sbSearch=new SidebarSearch;function setTitleSize(){var sb=templateOpts.sidebar.enabled;var nb=templateOpts.navbar.enabled;if(!sb&&!nb)return;var $a=sb?$(".sidebar-title a"):$(".navbar-title a");if($a.height()>18){var css={"font-size":"16px"};$a.parent().css(css);if(nb){$(".navbar-title").css(css)}}}function getCurrentOutline(){return isFilterActive?"flat":templateOpts.sidebar.outline}function setSidebarNodesOutline(outline){outline=outline||templateOpts.sidebar.outline;var isTree=outline==="tree";var $labels=$sidebarNodes.find(".item-label");if(isTree){$sidebarNodes.find(".item-tree-line").show();$labels.find(".symbol-memberof").addClass("no-width")}else{$sidebarNodes.find(".item-tree-line").hide();$labels.find(".symbol-memberof").removeClass("no-width")}$labels.removeClass("crop-to-fit");var delay=templateOpts.sidebar.animations?templateOpts.sidebar.itemsOverflow==="shrink"?0:240:0;setTimeout(function(){$labels.each(function(){helper.fitSidebarNavItems($(this),outline)})},delay);if(templateOpts.sidebar.itemsOverflow==="crop"){$labels.addClass("crop-to-fit");var $inners=$labels.find(".inner");$inners.css("text-overflow","clip")}}function cleanFilter(){sbSearch.reset();if(!templateOpts.sidebar.enabled||!$sidebarNodes)return;setFilterBtnStates();if($txtSearch)$txtSearch.val("");$sidebarNodes.removeClass("hidden");if($btnClean)$btnClean.hide();$(".toolbar-buttons > span").css("color","#fff");$(".chevron").show();setTimeout(function(){setSidebarNodesOutline(templateOpts.sidebar.outline);if($txtSearch)$txtSearch.focus()},100);isFilterActive=false}function setFilterBtnStates(){if(!$scopeFilterBtns||!$kindFilterBtns)return;$scopeFilterBtns.removeClass("active");sbSearch.scope.forEach(function(s){$scopeFilters.find('[data-scope="'+s+'"]').addClass("active")});$kindFilterBtns.removeClass("active");sbSearch.kind.forEach(function(s){$kindFilters.find('[data-kind="'+s+'"]').addClass("active")})}function applySearch(strSearch){sbSearch.parse(strSearch);setFilterBtnStates();$sidebarNodes.each(function(){var node=$(this);var show=true;if(sbSearch.scope.length>0){show=sbSearch.hasScope(node.attr("data-scope"))}if(show&&sbSearch.kind.length>0){show=sbSearch.hasKind(node.attr("data-kind"))}if(show&&sbSearch.keywords.length>0){show=sbSearch.matchesAnyKeyword(node.attr("data-keywords"))}if(show){node.removeClass("hidden")}else{node.addClass("hidden")}})}var debounceApplySearch=helper.debounce(applySearch,100,false);function filterSidebarNodes(strSearch){if(!templateOpts.sidebar.enabled)return;strSearch=(strSearch||"").trim().toLowerCase();if(!strSearch){cleanFilter();return}if($btnClean)$btnClean.show();toggleAllSubTrees(false);$(".chevron").hide();setFoldState(false);isFilterActive=true;setSidebarNodesOutline("flat");debounceApplySearch(strSearch);$(".toolbar-buttons > span").css("color","#3f4450")}function toggleSubTree(elem,fold){fold=typeof fold!=="boolean"?!elem.hasClass("members-folded"):fold;var parent;if(fold){parent=elem.addClass("members-folded").parent();parent.find(".item-members:first").addClass("no-height");parent.find(".item-inner > img.item-tree-parent").attr("src","img/tree-folded.png");setFoldState(true)}else{parent=elem.removeClass("members-folded").parent();parent.find(".item-members:first").removeClass("no-height");parent.find(".item-inner > img.item-tree-parent").attr("src","img/tree-parent.png")}}function toggleAllSubTrees(fold){$(".chevron").each(function(){toggleSubTree($(this),fold)})}function setFoldState(folded){var $btni=$btnSwitchFold.find("[data-fa-i2svg]").removeClass("fa-caret-square-right fa-caret-square-down");var newCls=!folded?"fa-caret-square-down":"fa-caret-square-right";isItemsFolded=folded;$btni.addClass(newCls)}function toggleHamMenu(show){if(!$nbmBtn)return;var fn=show?"addClass":"removeClass";$nbmBtn[fn]("toggled");$navOverlay[fn]("toggled");$navbarMenu[fn]("toggled");helper.toggleBodyScroll(!show);if(show){$navbarMenu.scrollTop(0);if($sidebarWrapper&&$sidebarWrapper.length){$wrapper.removeClass("toggled");$sidebarToggle.removeClass("toggled");$sidebarToggle.css("opacity",0)}}else{$sidebarToggle.css("opacity",1)}}function breakNavbarMenu(){if(!navbarMenuActuallWidth){navbarMenuActuallWidth=$navbarMenu.width()||500}var diff=$sidebarWrapper&&$sidebarWrapper.length?app.SIDEBAR_WIDTH:$navbarBrand.width();var breakMenu=($navbarInner.width()||0)-diff<=navbarMenuActuallWidth+50;if(breakMenu){if($nbmBtn.hasClass("break"))return;$nbmBtn.addClass("break");$navbarMenu.addClass("break");$navbarList.addClass("break")}else{toggleHamMenu(false);if(!$nbmBtn.hasClass("break"))return;$nbmBtn.removeClass("break");$navbarMenu.removeClass("break");$navbarList.removeClass("break")}}function checkOpenDetails(){if(docma.location.hash){var elem=$("details#"+$.escapeSelector(docma.location.hash));if(elem&&elem[0])elem.attr("open","")}}hljs.configure({tabReplace:" ",useBR:false});if(!templateOpts.title){templateOpts.title=docma.app.title||"Documentation"}docma.once("ready",function(){setTitleSize()});docma.on("render",function(currentRoute){isApiRoute=currentRoute&¤tRoute.type==="api";$("table").each(function(){$(this).html($.trim($(this).html()))});$("table:empty").remove();$wrapper=$("#wrapper");$sidebarWrapper=$("#sidebar-wrapper");$sidebarToggle=$("#sidebar-toggle");if(templateOpts.sidebar.animations){$wrapper.addClass("trans-all-ease");$sidebarWrapper.addClass("trans-all-ease")}else{$wrapper.removeClass("trans-all-ease");$sidebarWrapper.removeClass("trans-all-ease")}if(!templateOpts.navbar.enabled){$("body, html").css("padding-top",0);$sidebarWrapper.css("margin-top",0);$(".symbol-container").css({"padding-top":0,"margin-top":0})}else{$navbarInner=$(".navbar-inner");$navbarList=$(".navbar-list");$navbarBrand=$(".navbar-brand");$nbmBtn=$(".navbar-menu-btn");$navOverlay=$(".nav-overlay");$navbarMenu=$(".navbar-menu");if(!templateOpts.navbar.animations){$navOverlay.addClass("no-trans-force");$navbarMenu.addClass("no-trans-force");$navbarList.addClass("no-trans-force").find("ul").addClass("no-trans-force")}var navMargin=isApiRoute?55:0;$(".navbar-brand").css({"margin-left":navMargin+"px"});$(".navbar-menu").css({"margin-right":navMargin+"px"});$nbmBtn.on("click",function(){toggleHamMenu(!$navbarMenu.hasClass("toggled"))});var deBreakNavbarMenu=helper.debounce(breakNavbarMenu,50,false);setTimeout(function(){breakNavbarMenu();$(window).on("resize",deBreakNavbarMenu)},300);$navbarList.find('a[href="#"]').on("click",function(event){event.preventDefault()})}var examples=$("#docma-main pre > code");examples.each(function(i,block){hljs.highlightBlock(block)});checkOpenDetails();if(isApiRoute===false){$("table").addClass("table table-striped table-bordered");if(templateOpts.contentView.bookmarks){var bmSelector=typeof templateOpts.contentView.bookmarks==="string"?templateOpts.contentView.bookmarks:":header";$(bmSelector).each(function(){var bmHeading=$(this);var bmId=bmHeading.attr("id");if(bmId){bmHeading.addClass("zebra-bookmark").prepend('')}})}return}function searchHandler(){if(!$txtSearch)return;filterSidebarNodes($txtSearch.val())}var debounceSearchHandler=helper.debounce(searchHandler,200);function getFilterClickHandler(filter){var isKind=filter==="kind";var has=isKind?sbSearch.hasKind:sbSearch.hasScope;var add=isKind?sbSearch.addKind:sbSearch.addScope;var remove=isKind?sbSearch.removeKind:sbSearch.removeScope;return function(event){var btn=$(this);var value=(btn.attr("data-"+filter)||"*").toLowerCase();if(has.call(sbSearch,value)){remove.call(sbSearch,value)}else if(event.shiftKey){add.call(sbSearch,value)}else{sbSearch[filter]=[value]}var strSearch;if($txtSearch){sbSearch.parseKeywords($txtSearch.val());strSearch=sbSearch.toString();$txtSearch.val(strSearch).focus();if($btnClean)$btnClean.show()}else{sbSearch.keywords=[];strSearch=sbSearch.toString()}filterSidebarNodes(strSearch)}}if(templateOpts.sidebar.enabled){var sidebarHeaderHeight;if(templateOpts.sidebar.search){sidebarHeaderHeight=130;if(templateOpts.sidebar.toolbar)sidebarHeaderHeight+=app.TOOLBAR_HEIGHT}else{sidebarHeaderHeight=app.NAVBAR_HEIGHT;if(templateOpts.sidebar.toolbar)sidebarHeaderHeight+=app.TOOLBAR_HEIGHT+10}$(".sidebar-nav-container").css("top",sidebarHeaderHeight);$(".sidebar-header").css("height",sidebarHeaderHeight);if(templateOpts.sidebar.search){$btnClean=$(".sidebar-search-clean");$txtSearch=$("#txt-search");if($btnClean){$btnClean.hide();$btnClean.on("mousedown",cleanFilter)}if($txtSearch){$txtSearch.on("keyup",debounceSearchHandler);$txtSearch.on("change",searchHandler);$(".sidebar-search-icon").on("click",function(){$txtSearch.focus()});if(templateOpts.sidebar.animations){$txtSearch.addClass("trans-all-ease")}}}else{$(".sidebar-nav").css("top","0px")}$sidebarNodes=$("ul.sidebar-nav .sidebar-item");if(templateOpts.sidebar.animations){$sidebarNodes.addClass("trans-height-ease")}setSidebarNodesOutline();$btnSwitchOutline=$(".toolbar-buttons .btn-switch-outline");$btnSwitchFold=$(".toolbar-buttons .btn-switch-fold");toggleAllSubTrees(isItemsFolded);if(!templateOpts.sidebar.collapsed){$wrapper.addClass("toggled");$sidebarToggle.addClass("toggled")}$sidebarToggle.on("click",function(event){event.preventDefault();$wrapper.toggleClass("toggled");$sidebarToggle.toggleClass("toggled")});$(".chevron").on("click",function(){toggleSubTree($(this))});if(templateOpts.sidebar.toolbar){var kindButtons=helper.getSymbolInfo("namespace",null,true).badge+helper.getSymbolInfo("module",null,true).badge+helper.getSymbolInfo("typedef",null,true).badge+helper.getSymbolInfo("class",null,true).badge+helper.getSymbolInfo("method",null,true).badge+helper.getSymbolInfo("property",null,true).badge+helper.getSymbolInfo("enum",null,true).badge+helper.getSymbolInfo("event",null,true).badge;$kindFilters=$(".toolbar-kind-filters").html(kindButtons);$kindFilterBtns=$kindFilters.find(".badge-btn").on("click",getFilterClickHandler("kind"));var scopeButtons=helper.getScopeInfo("global").badge+helper.getScopeInfo("static").badge+helper.getScopeInfo("instance").badge+helper.getScopeInfo("inner").badge;$scopeFilters=$(".toolbar-scope-filters").html(scopeButtons);$scopeFilterBtns=$scopeFilters.find(".badge-scope-btn").on("click",getFilterClickHandler("scope"));$btnSwitchFold.on("click",function(){if(isFilterActive)return;setFoldState(!isItemsFolded);toggleAllSubTrees(isItemsFolded)});$btnSwitchOutline.on("click",function(){if(isFilterActive)return;var $btn=$(this);var $btni=$btn.find("[data-fa-i2svg]").removeClass("fa-outdent fa-indent");var newOutline,newCls;if(templateOpts.sidebar.outline==="flat"){newOutline="tree";newCls="fa-indent"}else{newOutline="flat";newCls="fa-outdent"}templateOpts.sidebar.outline=newOutline;$btni.addClass(newCls);setSidebarNodesOutline(newOutline)})}if(templateOpts.sidebar.itemsOverflow==="crop"){$sidebarNodes.hover(function(){setInnerMarginLeft($(this))},function(){setInnerMarginLeft($(this),true)})}}else{$wrapper.removeClass("toggled");$sidebarToggle.removeClass("toggled")}tippy("[title]",{placement:"bottom",animation:"scale",duration:200,arrow:true,appendTo:document.body,zIndex:9999999,theme:"zebra"})});function setInnerMarginLeft($elem,reset){var $inner=$elem.find(".crop-to-fit > .inner");var dMarginLeft="data-margin-"+getCurrentOutline();var m=parseInt($inner.attr(dMarginLeft),0)||0;$inner.css("margin-left",reset?0:m)}})(); -------------------------------------------------------------------------------- /docs/js/grumpy.min.js: -------------------------------------------------------------------------------- 1 | "use strict";function _instanceof(r,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?t[Symbol.hasInstance](r):r instanceof t}function _typeof(r){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(r)}function _slicedToArray(r,t){return _arrayWithHoles(r)||_iterableToArrayLimit(r,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function _iterableToArrayLimit(r,t){var e=[],n=!0,o=!1,i=void 0;try{for(var a,u=r[Symbol.iterator]();!(n=(a=u.next()).done)&&(e.push(a.value),!t||e.length!==t);n=!0);}catch(r){o=!0,i=r}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return e}function _arrayWithHoles(r){if(Array.isArray(r))return r}function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function _iterableToArray(r){if(Symbol.iterator in Object(r)||"[object Arguments]"===Object.prototype.toString.call(r))return Array.from(r)}function _arrayWithoutHoles(r){if(Array.isArray(r)){for(var t=0,e=new Array(r.length);t0&&void 0!==arguments[0]?arguments[0]:function(r,t){return+(r>t)||+(r===t)-1};return new t(_toConsumableArray(this.entries()).sort(function(t,e){return r(t[1],e[1],t[0],e[0])}))}}]),t}(); 2 | -------------------------------------------------------------------------------- /docs/js/highlight.pack.js: -------------------------------------------------------------------------------- 1 | /*! highlight.js v9.12.0 | BSD3 License | git.io/hljslicense */ 2 | !function(e){var n="object"==typeof window&&window||"object"==typeof self&&self;"undefined"!=typeof exports?e(exports):n&&(n.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return n.hljs}))}(function(e){function n(e){return e.replace(/&/g,"&").replace(//g,">")}function t(e){return e.nodeName.toLowerCase()}function r(e,n){var t=e&&e.exec(n);return t&&0===t.index}function a(e){return k.test(e)}function i(e){var n,t,r,i,o=e.className+" ";if(o+=e.parentNode?e.parentNode.className:"",t=B.exec(o))return w(t[1])?t[1]:"no-highlight";for(o=o.split(/\s+/),n=0,r=o.length;r>n;n++)if(i=o[n],a(i)||w(i))return i}function o(e){var n,t={},r=Array.prototype.slice.call(arguments,1);for(n in e)t[n]=e[n];return r.forEach(function(e){for(n in e)t[n]=e[n]}),t}function u(e){var n=[];return function r(e,a){for(var i=e.firstChild;i;i=i.nextSibling)3===i.nodeType?a+=i.nodeValue.length:1===i.nodeType&&(n.push({event:"start",offset:a,node:i}),a=r(i,a),t(i).match(/br|hr|img|input/)||n.push({event:"stop",offset:a,node:i}));return a}(e,0),n}function c(e,r,a){function i(){return e.length&&r.length?e[0].offset!==r[0].offset?e[0].offset"}function u(e){s+=""}function c(e){("start"===e.event?o:u)(e.node)}for(var l=0,s="",f=[];e.length||r.length;){var g=i();if(s+=n(a.substring(l,g[0].offset)),l=g[0].offset,g===e){f.reverse().forEach(u);do c(g.splice(0,1)[0]),g=i();while(g===e&&g.length&&g[0].offset===l);f.reverse().forEach(o)}else"start"===g[0].event?f.push(g[0].node):f.pop(),c(g.splice(0,1)[0])}return s+n(a.substr(l))}function l(e){return e.v&&!e.cached_variants&&(e.cached_variants=e.v.map(function(n){return o(e,{v:null},n)})),e.cached_variants||e.eW&&[o(e)]||[e]}function s(e){function n(e){return e&&e.source||e}function t(t,r){return new RegExp(n(t),"m"+(e.cI?"i":"")+(r?"g":""))}function r(a,i){if(!a.compiled){if(a.compiled=!0,a.k=a.k||a.bK,a.k){var o={},u=function(n,t){e.cI&&(t=t.toLowerCase()),t.split(" ").forEach(function(e){var t=e.split("|");o[t[0]]=[n,t[1]?Number(t[1]):1]})};"string"==typeof a.k?u("keyword",a.k):x(a.k).forEach(function(e){u(e,a.k[e])}),a.k=o}a.lR=t(a.l||/\w+/,!0),i&&(a.bK&&(a.b="\\b("+a.bK.split(" ").join("|")+")\\b"),a.b||(a.b=/\B|\b/),a.bR=t(a.b),a.e||a.eW||(a.e=/\B|\b/),a.e&&(a.eR=t(a.e)),a.tE=n(a.e)||"",a.eW&&i.tE&&(a.tE+=(a.e?"|":"")+i.tE)),a.i&&(a.iR=t(a.i)),null==a.r&&(a.r=1),a.c||(a.c=[]),a.c=Array.prototype.concat.apply([],a.c.map(function(e){return l("self"===e?a:e)})),a.c.forEach(function(e){r(e,a)}),a.starts&&r(a.starts,i);var c=a.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([a.tE,a.i]).map(n).filter(Boolean);a.t=c.length?t(c.join("|"),!0):{exec:function(){return null}}}}r(e)}function f(e,t,a,i){function o(e,n){var t,a;for(t=0,a=n.c.length;a>t;t++)if(r(n.c[t].bR,e))return n.c[t]}function u(e,n){if(r(e.eR,n)){for(;e.endsParent&&e.parent;)e=e.parent;return e}return e.eW?u(e.parent,n):void 0}function c(e,n){return!a&&r(n.iR,e)}function l(e,n){var t=N.cI?n[0].toLowerCase():n[0];return e.k.hasOwnProperty(t)&&e.k[t]}function p(e,n,t,r){var a=r?"":I.classPrefix,i='',i+n+o}function h(){var e,t,r,a;if(!E.k)return n(k);for(a="",t=0,E.lR.lastIndex=0,r=E.lR.exec(k);r;)a+=n(k.substring(t,r.index)),e=l(E,r),e?(B+=e[1],a+=p(e[0],n(r[0]))):a+=n(r[0]),t=E.lR.lastIndex,r=E.lR.exec(k);return a+n(k.substr(t))}function d(){var e="string"==typeof E.sL;if(e&&!y[E.sL])return n(k);var t=e?f(E.sL,k,!0,x[E.sL]):g(k,E.sL.length?E.sL:void 0);return E.r>0&&(B+=t.r),e&&(x[E.sL]=t.top),p(t.language,t.value,!1,!0)}function b(){L+=null!=E.sL?d():h(),k=""}function v(e){L+=e.cN?p(e.cN,"",!0):"",E=Object.create(e,{parent:{value:E}})}function m(e,n){if(k+=e,null==n)return b(),0;var t=o(n,E);if(t)return t.skip?k+=n:(t.eB&&(k+=n),b(),t.rB||t.eB||(k=n)),v(t,n),t.rB?0:n.length;var r=u(E,n);if(r){var a=E;a.skip?k+=n:(a.rE||a.eE||(k+=n),b(),a.eE&&(k=n));do E.cN&&(L+=C),E.skip||(B+=E.r),E=E.parent;while(E!==r.parent);return r.starts&&v(r.starts,""),a.rE?0:n.length}if(c(n,E))throw new Error('Illegal lexeme "'+n+'" for mode "'+(E.cN||"")+'"');return k+=n,n.length||1}var N=w(e);if(!N)throw new Error('Unknown language: "'+e+'"');s(N);var R,E=i||N,x={},L="";for(R=E;R!==N;R=R.parent)R.cN&&(L=p(R.cN,"",!0)+L);var k="",B=0;try{for(var M,j,O=0;;){if(E.t.lastIndex=O,M=E.t.exec(t),!M)break;j=m(t.substring(O,M.index),M[0]),O=M.index+j}for(m(t.substr(O)),R=E;R.parent;R=R.parent)R.cN&&(L+=C);return{r:B,value:L,language:e,top:E}}catch(T){if(T.message&&-1!==T.message.indexOf("Illegal"))return{r:0,value:n(t)};throw T}}function g(e,t){t=t||I.languages||x(y);var r={r:0,value:n(e)},a=r;return t.filter(w).forEach(function(n){var t=f(n,e,!1);t.language=n,t.r>a.r&&(a=t),t.r>r.r&&(a=r,r=t)}),a.language&&(r.second_best=a),r}function p(e){return I.tabReplace||I.useBR?e.replace(M,function(e,n){return I.useBR&&"\n"===e?"
    ":I.tabReplace?n.replace(/\t/g,I.tabReplace):""}):e}function h(e,n,t){var r=n?L[n]:t,a=[e.trim()];return e.match(/\bhljs\b/)||a.push("hljs"),-1===e.indexOf(r)&&a.push(r),a.join(" ").trim()}function d(e){var n,t,r,o,l,s=i(e);a(s)||(I.useBR?(n=document.createElementNS("http://www.w3.org/1999/xhtml","div"),n.innerHTML=e.innerHTML.replace(/\n/g,"").replace(//g,"\n")):n=e,l=n.textContent,r=s?f(s,l,!0):g(l),t=u(n),t.length&&(o=document.createElementNS("http://www.w3.org/1999/xhtml","div"),o.innerHTML=r.value,r.value=c(t,u(o),l)),r.value=p(r.value),e.innerHTML=r.value,e.className=h(e.className,s,r.language),e.result={language:r.language,re:r.r},r.second_best&&(e.second_best={language:r.second_best.language,re:r.second_best.r}))}function b(e){I=o(I,e)}function v(){if(!v.called){v.called=!0;var e=document.querySelectorAll("pre code");E.forEach.call(e,d)}}function m(){addEventListener("DOMContentLoaded",v,!1),addEventListener("load",v,!1)}function N(n,t){var r=y[n]=t(e);r.aliases&&r.aliases.forEach(function(e){L[e]=n})}function R(){return x(y)}function w(e){return e=(e||"").toLowerCase(),y[e]||y[L[e]]}var E=[],x=Object.keys,y={},L={},k=/^(no-?highlight|plain|text)$/i,B=/\blang(?:uage)?-([\w-]+)\b/i,M=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,C="
    ",I={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0};return e.highlight=f,e.highlightAuto=g,e.fixMarkup=p,e.highlightBlock=d,e.configure=b,e.initHighlighting=v,e.initHighlightingOnLoad=m,e.registerLanguage=N,e.listLanguages=R,e.getLanguage=w,e.inherit=o,e.IR="[a-zA-Z]\\w*",e.UIR="[a-zA-Z_]\\w*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},e.C=function(n,t,r){var a=e.inherit({cN:"comment",b:n,e:t,c:[]},r||{});return a.c.push(e.PWM),a.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),a},e.CLCM=e.C("//","$"),e.CBCM=e.C("/\\*","\\*/"),e.HCM=e.C("#","$"),e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e.METHOD_GUARD={b:"\\.\\s*"+e.UIR,r:0},e});hljs.registerLanguage("json",function(e){var i={literal:"true false null"},n=[e.QSM,e.CNM],r={e:",",eW:!0,eE:!0,c:n,k:i},t={b:"{",e:"}",c:[{cN:"attr",b:/"/,e:/"/,c:[e.BE],i:"\\n"},e.inherit(r,{b:/:/})],i:"\\S"},c={b:"\\[",e:"\\]",c:[e.inherit(r)],i:"\\S"};return n.splice(n.length,0,t,c),{c:n,k:i,i:"\\S"}});hljs.registerLanguage("http",function(e){var t="HTTP/[0-9\\.]+";return{aliases:["https"],i:"\\S",c:[{b:"^"+t,e:"$",c:[{cN:"number",b:"\\b\\d{3}\\b"}]},{b:"^[A-Z]+ (.*?) "+t+"$",rB:!0,e:"$",c:[{cN:"string",b:" ",e:" ",eB:!0,eE:!0},{b:t},{cN:"keyword",b:"[A-Z]+"}]},{cN:"attribute",b:"^\\w",e:": ",eE:!0,i:"\\n|\\s|=",starts:{e:"$",r:0}},{b:"\\n\\n",starts:{sL:[],eW:!0}}]}});hljs.registerLanguage("bash",function(e){var t={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)}/}]},s={cN:"string",b:/"/,e:/"/,c:[e.BE,t,{cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]}]},a={cN:"string",b:/'/,e:/'/};return{aliases:["sh","zsh"],l:/\b-?[a-z\._]+\b/,k:{keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",_:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"meta",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:!0,c:[e.inherit(e.TM,{b:/\w[\w\d_]*/})],r:0},e.HCM,s,a,t]}});hljs.registerLanguage("javascript",function(e){var r="[A-Za-z$_][0-9A-Za-z$_]*",t={keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await static import from as",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},a={cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:e.CNR}],r:0},n={cN:"subst",b:"\\$\\{",e:"\\}",k:t,c:[]},c={cN:"string",b:"`",e:"`",c:[e.BE,n]};n.c=[e.ASM,e.QSM,c,a,e.RM];var s=n.c.concat([e.CBCM,e.CLCM]);return{aliases:["js","jsx"],k:t,c:[{cN:"meta",r:10,b:/^\s*['"]use (strict|asm)['"]/},{cN:"meta",b:/^#!/,e:/$/},e.ASM,e.QSM,c,e.CLCM,e.CBCM,a,{b:/[{,]\s*/,r:0,c:[{b:r+"\\s*:",rB:!0,r:0,c:[{cN:"attr",b:r,r:0}]}]},{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM,{cN:"function",b:"(\\(.*?\\)|"+r+")\\s*=>",rB:!0,e:"\\s*=>",c:[{cN:"params",v:[{b:r},{b:/\(\s*\)/},{b:/\(/,e:/\)/,eB:!0,eE:!0,k:t,c:s}]}]},{b://,sL:"xml",c:[{b:/<\w+\s*\/>/,skip:!0},{b:/<\w+/,e:/(\/\w+|\w+\/)>/,skip:!0,c:[{b:/<\w+\s*\/>/,skip:!0},"self"]}]}],r:0},{cN:"function",bK:"function",e:/\{/,eE:!0,c:[e.inherit(e.TM,{b:r}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,c:s}],i:/\[|%/},{b:/\$[(.]/},e.METHOD_GUARD,{cN:"class",bK:"class",e:/[{;=]/,eE:!0,i:/[:"\[\]]/,c:[{bK:"extends"},e.UTM]},{bK:"constructor",e:/\{/,eE:!0}],i:/#(?!!)/}});hljs.registerLanguage("less",function(e){var r="[\\w-]+",t="("+r+"|@{"+r+"})",a=[],c=[],s=function(e){return{cN:"string",b:"~?"+e+".*?"+e}},b=function(e,r,t){return{cN:e,b:r,r:t}},n={b:"\\(",e:"\\)",c:c,r:0};c.push(e.CLCM,e.CBCM,s("'"),s('"'),e.CSSNM,{b:"(url|data-uri)\\(",starts:{cN:"string",e:"[\\)\\n]",eE:!0}},b("number","#[0-9A-Fa-f]+\\b"),n,b("variable","@@?"+r,10),b("variable","@{"+r+"}"),b("built_in","~?`[^`]*?`"),{cN:"attribute",b:r+"\\s*:",e:":",rB:!0,eE:!0},{cN:"meta",b:"!important"});var i=c.concat({b:"{",e:"}",c:a}),o={bK:"when",eW:!0,c:[{bK:"and not"}].concat(c)},u={b:t+"\\s*:",rB:!0,e:"[;}]",r:0,c:[{cN:"attribute",b:t,e:":",eE:!0,starts:{eW:!0,i:"[<=$]",r:0,c:c}}]},l={cN:"keyword",b:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{e:"[;{}]",rE:!0,c:c,r:0}},C={cN:"variable",v:[{b:"@"+r+"\\s*:",r:15},{b:"@"+r}],starts:{e:"[;}]",rE:!0,c:i}},p={v:[{b:"[\\.#:&\\[>]",e:"[;{}]"},{b:t,e:"{"}],rB:!0,rE:!0,i:"[<='$\"]",r:0,c:[e.CLCM,e.CBCM,o,b("keyword","all\\b"),b("variable","@{"+r+"}"),b("selector-tag",t+"%?",0),b("selector-id","#"+t),b("selector-class","\\."+t,0),b("selector-tag","&",0),{cN:"selector-attr",b:"\\[",e:"\\]"},{cN:"selector-pseudo",b:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{b:"\\(",e:"\\)",c:i},{b:"!important"}]};return a.push(e.CLCM,e.CBCM,l,C,u,p),{cI:!0,i:"[=>'/<($\"]",c:a}});hljs.registerLanguage("xml",function(s){var e="[A-Za-z0-9\\._:-]+",t={eW:!0,i:/`]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist"],cI:!0,c:[{cN:"meta",b:"",r:10,c:[{b:"\\[",e:"\\]"}]},s.C("",{r:10}),{b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{b:/<\?(php)?/,e:/\?>/,sL:"php",c:[{b:"/\\*",e:"\\*/",skip:!0}]},{cN:"tag",b:"|$)",e:">",k:{name:"style"},c:[t],starts:{e:"",rE:!0,sL:["css","xml"]}},{cN:"tag",b:"|$)",e:">",k:{name:"script"},c:[t],starts:{e:"",rE:!0,sL:["actionscript","javascript","handlebars","xml"]}},{cN:"meta",v:[{b:/<\?xml/,e:/\?>/,r:10},{b:/<\?\w+/,e:/\?>/}]},{cN:"tag",b:"",c:[{cN:"name",b:/[^\/><\s]+/,r:0},t]}]}});hljs.registerLanguage("markdown",function(e){return{aliases:["md","mkdown","mkd"],c:[{cN:"section",v:[{b:"^#{1,6}",e:"$"},{b:"^.+?\\n[=-]{2,}$"}]},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",v:[{b:"\\*.+?\\*"},{b:"_.+?_",r:0}]},{cN:"quote",b:"^>\\s+",e:"$"},{cN:"code",v:[{b:"^```w*s*$",e:"^```s*$"},{b:"`.+?`"},{b:"^( {4}| )",e:"$",r:0}]},{b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].*?[\\)\\]]",rB:!0,c:[{cN:"string",b:"\\[",e:"\\]",eB:!0,rE:!0,r:0},{cN:"link",b:"\\]\\(",e:"\\)",eB:!0,eE:!0},{cN:"symbol",b:"\\]\\[",e:"\\]",eB:!0,eE:!0}],r:10},{b:/^\[[^\n]+\]:/,rB:!0,c:[{cN:"symbol",b:/\[/,e:/\]/,eB:!0,eE:!0},{cN:"link",b:/:\s*/,e:/$/,eB:!0}]}]}});hljs.registerLanguage("scss",function(e){var t="[a-zA-Z-][a-zA-Z0-9_-]*",i={cN:"variable",b:"(\\$"+t+")\\b"},r={cN:"number",b:"#[0-9A-Fa-f]+"};({cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:!0,i:"[^\\s]",starts:{eW:!0,eE:!0,c:[r,e.CSSNM,e.QSM,e.ASM,e.CBCM,{cN:"meta",b:"!important"}]}});return{cI:!0,i:"[=/|']",c:[e.CLCM,e.CBCM,{cN:"selector-id",b:"\\#[A-Za-z0-9_-]+",r:0},{cN:"selector-class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"selector-attr",b:"\\[",e:"\\]",i:"$"},{cN:"selector-tag",b:"\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b",r:0},{b:":(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)"},{b:"::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)"},i,{cN:"attribute",b:"\\b(z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background-blend-mode|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\b",i:"[^\\s]"},{b:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{b:":",e:";",c:[i,r,e.CSSNM,e.QSM,e.ASM,{cN:"meta",b:"!important"}]},{b:"@",e:"[{;]",k:"mixin include extend for if else each while charset import debug media page content font-face namespace warn",c:[i,e.QSM,e.ASM,r,e.CSSNM,{b:"\\s[A-Za-z0-9_.-]+",r:0}]}]}});hljs.registerLanguage("dust",function(e){var t="if eq ne lt lte gt gte select default math sep";return{aliases:["dst"],cI:!0,sL:"xml",c:[{cN:"template-tag",b:/\{[#\/]/,e:/\}/,i:/;/,c:[{cN:"name",b:/[a-zA-Z\.-]+/,starts:{eW:!0,r:0,c:[e.QSM]}}]},{cN:"template-variable",b:/\{/,e:/\}/,i:/;/,k:t}]}});hljs.registerLanguage("shell",function(s){return{aliases:["console"],c:[{cN:"meta",b:"^\\s{0,3}[\\w\\d\\[\\]()@-]*[>%$#]",starts:{e:"$",sL:"bash"}}]}});hljs.registerLanguage("css",function(e){var c="[a-zA-Z-][a-zA-Z0-9_-]*",t={b:/[A-Z\_\.\-]+\s*:/,rB:!0,e:";",eW:!0,c:[{cN:"attribute",b:/\S/,e:":",eE:!0,starts:{eW:!0,eE:!0,c:[{b:/[\w-]+\(/,rB:!0,c:[{cN:"built_in",b:/[\w-]+/},{b:/\(/,e:/\)/,c:[e.ASM,e.QSM]}]},e.CSSNM,e.QSM,e.ASM,e.CBCM,{cN:"number",b:"#[0-9A-Fa-f]+"},{cN:"meta",b:"!important"}]}}]};return{cI:!0,i:/[=\/|'\$]/,c:[e.CBCM,{cN:"selector-id",b:/#[A-Za-z0-9_-]+/},{cN:"selector-class",b:/\.[A-Za-z0-9_-]+/},{cN:"selector-attr",b:/\[/,e:/\]/,i:"$"},{cN:"selector-pseudo",b:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{b:"@",e:"[{;]",i:/:/,c:[{cN:"keyword",b:/\w+/},{b:/\s/,eW:!0,eE:!0,r:0,c:[e.ASM,e.QSM,e.CSSNM]}]},{cN:"selector-tag",b:c,r:0},{b:"{",e:"}",i:/\S/,c:[e.CBCM,t]}]}});hljs.registerLanguage("typescript",function(e){var r={keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const class public private protected get set super static implements enum export import declare type namespace abstract as from extends async await",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document any number boolean string void Promise"};return{aliases:["ts"],k:r,c:[{cN:"meta",b:/^\s*['"]use strict['"]/},e.ASM,e.QSM,{cN:"string",b:"`",e:"`",c:[e.BE,{cN:"subst",b:"\\$\\{",e:"\\}"}]},e.CLCM,e.CBCM,{cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:e.CNR}],r:0},{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM,{cN:"function",b:"(\\(.*?\\)|"+e.IR+")\\s*=>",rB:!0,e:"\\s*=>",c:[{cN:"params",v:[{b:e.IR},{b:/\(\s*\)/},{b:/\(/,e:/\)/,eB:!0,eE:!0,k:r,c:["self",e.CLCM,e.CBCM]}]}]}],r:0},{cN:"function",b:"function",e:/[\{;]/,eE:!0,k:r,c:["self",e.inherit(e.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,k:r,c:[e.CLCM,e.CBCM],i:/["'\(]/}],i:/%/,r:0},{bK:"constructor",e:/\{/,eE:!0,c:["self",{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,k:r,c:[e.CLCM,e.CBCM],i:/["'\(]/}]},{b:/module\./,k:{built_in:"module"},r:0},{bK:"module",e:/\{/,eE:!0},{bK:"interface",e:/\{/,eE:!0,k:"interface extends"},{b:/\$[(.]/},{b:"\\."+e.IR,r:0},{cN:"meta",b:"@[A-Za-z]+"}]}}); -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "grumpy", 3 | "version": "0.2.4", 4 | "description": "Painless key-value storage.", 5 | "main": "dist/index.js", 6 | "types": "dist/index.d.ts", 7 | "scripts": { 8 | "build": "del-cli dist && yarn pretty && rollup -c && yarn minify && del-cli dist/index-cjs.js && yarn test", 9 | "minify": "uglifyjs dist/index-cjs.js --compress --mangle > dist/index.js", 10 | "pretty": "prettier --write \"src/*.ts\"", 11 | "test": "node test/index.js" 12 | }, 13 | "repository": { 14 | "type": "git", 15 | "url": "git+https://github.com/aidenybai/grumpy.git" 16 | }, 17 | "keywords": [ 18 | "🔑", 19 | "map", 20 | "grumpy", 21 | "utility", 22 | "array", 23 | "easy", 24 | "fast", 25 | "better", 26 | "set", 27 | "structure", 28 | "data", 29 | "hashmap", 30 | "list" 31 | ], 32 | "author": "Aiden Bai (https://bai.js.org/)", 33 | "license": "MIT", 34 | "bugs": { 35 | "url": "https://github.com/aidenybai/grumpy/issues" 36 | }, 37 | "homepage": "https://grumpy.js.org/", 38 | "engines": { 39 | "node": ">=6.4.0" 40 | }, 41 | "devDependencies": { 42 | "del-cli": "^2.0.0", 43 | "prettier": "^1.18.2", 44 | "rollup": "^1.17.0", 45 | "rollup-plugin-typescript2": "^0.22.1", 46 | "typescript": "^3.5.3", 47 | "uglify-es": "^3.3.9" 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /rollup.config.js: -------------------------------------------------------------------------------- 1 | import typescript from 'rollup-plugin-typescript2'; 2 | 3 | export default { 4 | input: 'src/index.ts', 5 | plugins: [typescript()], 6 | output: [{ 7 | file: 'dist/index-cjs.js', 8 | format: 'cjs' 9 | }] 10 | }; -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | class Grumpy extends Map { 2 | private _array: any = null; 3 | private _keyArray: any = null; 4 | 5 | constructor(iterable?: any[]) { 6 | super(); 7 | 8 | if (iterable !== undefined) { 9 | for (const [key, value] of iterable) { 10 | this.set(key, value); 11 | } 12 | } 13 | } 14 | 15 | public array(): any[] { 16 | if (!this._array || this._array.length !== this.size) this._array = [...this.values()]; 17 | return this._array; 18 | } 19 | 20 | public clone(): Grumpy { 21 | return new Grumpy([...this.entries()]); 22 | } 23 | 24 | public concat(...groups: Grumpy[]): Grumpy { 25 | if (groups === undefined) throw new Error('Groups is a required argument'); 26 | const newGroup: Grumpy = this.clone(); 27 | for (const group of groups) { 28 | for (const [key, val] of group) { 29 | newGroup.set(key, val); 30 | } 31 | } 32 | return newGroup; 33 | } 34 | 35 | public cut(fn: Function, thisArg?: any): Grumpy[] { 36 | if (fn === undefined) throw new Error('Function is a required argument'); 37 | if (thisArg !== undefined) fn = fn.bind(thisArg); 38 | let results: Grumpy[] = [new Grumpy(), new Grumpy()]; 39 | for (const [key, val] of this) { 40 | if (fn(val, key, this)) results[0].set(key, val); 41 | else results[1].set(key, val); 42 | } 43 | return results; 44 | } 45 | 46 | public delete(key: any, time?: number): any { 47 | this._array = null; 48 | this._keyArray = null; 49 | 50 | if (key === undefined) throw new Error('Key is a required argument'); 51 | if (time) { 52 | setTimeout(() => { 53 | this.delete(key); 54 | }, time); 55 | } else { 56 | super.delete(key); 57 | } 58 | } 59 | 60 | public each(fn: any, thisArg?: any): Grumpy { 61 | if (fn === undefined) throw new Error('Function is a required argument'); 62 | this.forEach(fn, thisArg); 63 | return this; 64 | } 65 | 66 | public equals(group: any): boolean { 67 | if (!group) return false; 68 | if (this === group) return true; 69 | if (this.size !== group.size) return false; 70 | for (const [key, value] of this) { 71 | if (!group.has(key) || value !== group.get(key)) { 72 | return false; 73 | } 74 | } 75 | return true; 76 | } 77 | 78 | public every(fn: Function, thisArg?: any): boolean { 79 | if (fn === undefined) throw new Error('Function is a required argument'); 80 | if (thisArg) fn = fn.bind(thisArg); 81 | for (const [key, val] of this) { 82 | if (!fn(val, key, this)) return false; 83 | } 84 | return true; 85 | } 86 | 87 | public filter(fn: Function, thisArg?: any): Grumpy { 88 | if (fn === undefined) throw new Error('Function is a required argument'); 89 | if (thisArg) fn = fn.bind(thisArg); 90 | const results: Grumpy = new Grumpy(); 91 | 92 | for (const [key, val] of this) { 93 | if (fn(val, key, this)) results.set(key, val); 94 | } 95 | return results; 96 | } 97 | 98 | public find(fn: Function, thisArg?: any): any { 99 | if (fn === undefined) throw new Error('Function is a required argument'); 100 | if (thisArg !== undefined) fn = fn.bind(thisArg); 101 | for (const [key, val] of this) { 102 | if (fn(val, key, this)) return val; 103 | } 104 | return undefined; 105 | } 106 | 107 | public first(count?: number): any { 108 | if (count === undefined) return this.values().next().value; 109 | if (!Number.isInteger(count) || count < 1) 110 | throw new RangeError('Count must be an integer greater than 0'); 111 | 112 | count = Math.min(this.size, count); 113 | 114 | const arr: any[] = [count]; 115 | const iter: any = this.values(); 116 | 117 | for (let i: number = 0; i < count; i++) { 118 | arr[i] = iter.next().value; 119 | } 120 | return arr; 121 | } 122 | 123 | public firstKey(count?: number): any { 124 | if (count === undefined) return this.keys().next().value; 125 | if (!Number.isInteger(count) || count < 1) 126 | throw new RangeError('Count must be an integer greater than 0'); 127 | 128 | count = Math.min(this.size, count); 129 | 130 | const arr: any[] = [count]; 131 | const iter: any = this.keys(); 132 | 133 | for (let i: number = 0; i < count; i++) { 134 | arr[i] = iter.next().value; 135 | } 136 | return arr; 137 | } 138 | 139 | public flatMap(fn: Function, thisArg?: any): Grumpy { 140 | const groups: any[] = this.map(fn, thisArg); 141 | return new Grumpy().concat(...groups); 142 | } 143 | 144 | public keyArray(): any[] { 145 | if (!this._keyArray || this._keyArray.length !== this.size) this._keyArray = [...this.keys()]; 146 | return this._keyArray; 147 | } 148 | 149 | public last(count?: number): any { 150 | const arr: any[] = this.array(); 151 | 152 | if (count === undefined) return arr[arr.length - 1]; 153 | if (!Number.isInteger(count) || count < 1) 154 | throw new RangeError('Count must be an integer greater than 0'); 155 | 156 | return arr.slice(-count); 157 | } 158 | 159 | public lastKey(count?: number): any { 160 | const arr: any[] = this.keyArray(); 161 | 162 | if (count === undefined) return arr[arr.length - 1]; 163 | if (!Number.isInteger(count) || count < 1) 164 | throw new RangeError('Count must be an integer greater than 0'); 165 | 166 | return arr.slice(-count); 167 | } 168 | 169 | public map(fn: Function, thisArg?: any): any[] { 170 | if (fn === undefined) throw new Error('Function is a required argument'); 171 | if (thisArg) fn = fn.bind(thisArg); 172 | const arr: any[] = [this.size]; 173 | let i: number = 0; 174 | 175 | for (const [key, val] of this) { 176 | arr[i++] = fn(val, key, this); 177 | } 178 | return arr; 179 | } 180 | 181 | public mapValues(fn: Function, thisArg?: any): any[] { 182 | if (fn === undefined) throw new Error('Function is a required argument'); 183 | if (thisArg !== undefined) fn = fn.bind(thisArg); 184 | const group: Grumpy = new Grumpy(); 185 | for (const [key, val] of this) { 186 | group.set(key, fn(val, key, this)); 187 | } 188 | return group.array(); 189 | } 190 | 191 | public random(count?: number): any { 192 | let arr: any[] = this.array(); 193 | 194 | if (count === undefined) return arr[Math.floor(Math.random() * arr.length)]; 195 | if (!Number.isInteger(count) || count < 1) 196 | throw new RangeError('Count must be an integer greater than 0'); 197 | if (arr.length === 0) return []; 198 | 199 | const rand: any[] = [count]; 200 | arr = arr.slice(); 201 | 202 | for (let i: number = 0; i < count; i++) { 203 | rand[i] = arr.splice(Math.floor(Math.random() * arr.length), 1)[0]; 204 | } 205 | return rand; 206 | } 207 | 208 | public randomKey(count?: number): any { 209 | let arr: any[] = this.keyArray(); 210 | 211 | if (count === undefined) return arr[Math.floor(Math.random() * arr.length)]; 212 | if (!Number.isInteger(count) || count < 1) 213 | throw new RangeError('Count must be an integer greater than 0'); 214 | if (arr.length === 0) return []; 215 | 216 | const rand: any[] = [count]; 217 | arr = arr.slice(); 218 | 219 | for (let i: number = 0; i < count; i++) { 220 | rand[i] = arr.splice(Math.floor(Math.random() * arr.length), 1)[0]; 221 | } 222 | return rand; 223 | } 224 | 225 | public reduce(fn: Function, initialValue?: any): any { 226 | if (fn === undefined) throw new Error('Function is a required argument'); 227 | let accumulator: any; 228 | if (initialValue !== undefined) { 229 | accumulator = initialValue; 230 | for (const [key, val] of this) { 231 | accumulator = fn(accumulator, val, key, this); 232 | } 233 | } else { 234 | let first: boolean = true; 235 | for (const [key, val] of this) { 236 | if (first) { 237 | accumulator = val; 238 | first = false; 239 | continue; 240 | } 241 | accumulator = fn(accumulator, val, key, this); 242 | } 243 | } 244 | return accumulator; 245 | } 246 | 247 | public set(key: any, value: any, time?: number): any { 248 | this._array = null; 249 | this._keyArray = null; 250 | 251 | if (key === undefined) throw new Error('Key is a required argument'); 252 | if (value === undefined) throw new Error('Value is a required argument'); 253 | if (time) { 254 | super.set(key, value); 255 | setTimeout(() => { 256 | this.delete(key); 257 | }, time); 258 | } else { 259 | super.set(key, value); 260 | } 261 | } 262 | 263 | public shuffle(): Grumpy { 264 | const entries: any[] = [...this.entries()]; 265 | let currentIndex: number = entries.length; 266 | let temporaryValue: any; 267 | let randomIndex: number; 268 | 269 | while (0 !== currentIndex) { 270 | randomIndex = Math.floor(Math.random() * currentIndex); 271 | currentIndex -= 1; 272 | 273 | temporaryValue = entries[currentIndex]; 274 | entries[currentIndex] = entries[randomIndex]; 275 | entries[randomIndex] = temporaryValue; 276 | } 277 | 278 | this.clear(); 279 | for (const [key, val] of entries) { 280 | this.set(key, val); 281 | } 282 | return this; 283 | } 284 | 285 | public sift(fn: Function, thisArg?: any): number { 286 | if (fn === undefined) throw new Error('Function is a required argument'); 287 | if (thisArg) fn = fn.bind(thisArg); 288 | const previousSize: number = this.size; 289 | for (const [key, val] of this) { 290 | if (fn(val, key, this)) this.delete(key); 291 | } 292 | return previousSize - this.size; 293 | } 294 | 295 | public some(fn: Function, thisArg?: any): boolean { 296 | if (fn === undefined) throw new Error('Function is a required argument'); 297 | if (thisArg) fn = fn.bind(thisArg); 298 | for (const [key, val] of this) { 299 | if (fn(val, key, this)) return true; 300 | } 301 | return false; 302 | } 303 | 304 | public sort(compareFunction: any = (a: any, b: any) => +(a > b) || +(a === b) - 1): Grumpy { 305 | const entries: any[] = [...this.entries()]; 306 | entries.sort((a, b) => compareFunction(a[1], b[1], a[0], b[0])); 307 | this.clear(); 308 | for (const [key, val] of entries) { 309 | this.set(key, val); 310 | } 311 | return this; 312 | } 313 | 314 | public sorted(compareFunction: any = (a: any, b: any) => +(a > b) || +(a === b) - 1): Grumpy { 315 | return new Grumpy( 316 | [...this.entries()].sort((a, b) => { 317 | return compareFunction(a[1], b[1], a[0], b[0]); 318 | }) 319 | ); 320 | } 321 | } 322 | 323 | export default Grumpy; 324 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "esnext", 4 | "declaration": true, 5 | "moduleResolution": "node", 6 | "strict": true, 7 | "esModuleInterop": true, 8 | "outDir": "dist", 9 | "removeComments": true 10 | } 11 | } -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@types/estree@0.0.39": 6 | version "0.0.39" 7 | resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" 8 | integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== 9 | 10 | "@types/events@*": 11 | version "3.0.0" 12 | resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7" 13 | integrity sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g== 14 | 15 | "@types/glob@^7.1.1": 16 | version "7.1.1" 17 | resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.1.tgz#aa59a1c6e3fbc421e07ccd31a944c30eba521575" 18 | integrity sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w== 19 | dependencies: 20 | "@types/events" "*" 21 | "@types/minimatch" "*" 22 | "@types/node" "*" 23 | 24 | "@types/minimatch@*": 25 | version "3.0.3" 26 | resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" 27 | integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== 28 | 29 | "@types/node@*", "@types/node@^12.6.2": 30 | version "12.6.8" 31 | resolved "https://registry.yarnpkg.com/@types/node/-/node-12.6.8.tgz#e469b4bf9d1c9832aee4907ba8a051494357c12c" 32 | integrity sha512-aX+gFgA5GHcDi89KG5keey2zf0WfZk/HAQotEamsK2kbey+8yGKcson0hbK8E+v0NArlCJQCqMP161YhV6ZXLg== 33 | 34 | acorn@^6.2.0: 35 | version "6.2.1" 36 | resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.2.1.tgz#3ed8422d6dec09e6121cc7a843ca86a330a86b51" 37 | integrity sha512-JD0xT5FCRDNyjDda3Lrg/IxFscp9q4tiYtxE1/nOzlKCk7hIRuYjhq1kCNkbPjMRMZuFq20HNQn1I9k8Oj0E+Q== 38 | 39 | array-find-index@^1.0.1: 40 | version "1.0.2" 41 | resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" 42 | integrity sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E= 43 | 44 | array-union@^1.0.1: 45 | version "1.0.2" 46 | resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" 47 | integrity sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk= 48 | dependencies: 49 | array-uniq "^1.0.1" 50 | 51 | array-uniq@^1.0.1: 52 | version "1.0.3" 53 | resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" 54 | integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= 55 | 56 | arrify@^1.0.1: 57 | version "1.0.1" 58 | resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" 59 | integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= 60 | 61 | balanced-match@^1.0.0: 62 | version "1.0.0" 63 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" 64 | integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= 65 | 66 | brace-expansion@^1.1.7: 67 | version "1.1.11" 68 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" 69 | integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== 70 | dependencies: 71 | balanced-match "^1.0.0" 72 | concat-map "0.0.1" 73 | 74 | camelcase-keys@^4.0.0: 75 | version "4.2.0" 76 | resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-4.2.0.tgz#a2aa5fb1af688758259c32c141426d78923b9b77" 77 | integrity sha1-oqpfsa9oh1glnDLBQUJteJI7m3c= 78 | dependencies: 79 | camelcase "^4.1.0" 80 | map-obj "^2.0.0" 81 | quick-lru "^1.0.0" 82 | 83 | camelcase@^4.1.0: 84 | version "4.1.0" 85 | resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" 86 | integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= 87 | 88 | commander@~2.13.0: 89 | version "2.13.0" 90 | resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c" 91 | integrity sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA== 92 | 93 | concat-map@0.0.1: 94 | version "0.0.1" 95 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" 96 | integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= 97 | 98 | currently-unhandled@^0.4.1: 99 | version "0.4.1" 100 | resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" 101 | integrity sha1-mI3zP+qxke95mmE2nddsF635V+o= 102 | dependencies: 103 | array-find-index "^1.0.1" 104 | 105 | decamelize-keys@^1.0.0: 106 | version "1.1.0" 107 | resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.0.tgz#d171a87933252807eb3cb61dc1c1445d078df2d9" 108 | integrity sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk= 109 | dependencies: 110 | decamelize "^1.1.0" 111 | map-obj "^1.0.0" 112 | 113 | decamelize@^1.1.0: 114 | version "1.2.0" 115 | resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" 116 | integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= 117 | 118 | del-cli@^2.0.0: 119 | version "2.0.0" 120 | resolved "https://registry.yarnpkg.com/del-cli/-/del-cli-2.0.0.tgz#e9a778398863c26796d85409b9891f98b0122cd1" 121 | integrity sha512-IREsO6mjSTxxvWLKMMUi1G0izhqEBx7qeDkOJ6H3+TJl8gQl6x5C5hK4Sm1GJ51KodUMR6O7HuIhnF24Edua3g== 122 | dependencies: 123 | del "^4.1.1" 124 | meow "^5.0.0" 125 | 126 | del@^4.1.1: 127 | version "4.1.1" 128 | resolved "https://registry.yarnpkg.com/del/-/del-4.1.1.tgz#9e8f117222ea44a31ff3a156c049b99052a9f0b4" 129 | integrity sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ== 130 | dependencies: 131 | "@types/glob" "^7.1.1" 132 | globby "^6.1.0" 133 | is-path-cwd "^2.0.0" 134 | is-path-in-cwd "^2.0.0" 135 | p-map "^2.0.0" 136 | pify "^4.0.1" 137 | rimraf "^2.6.3" 138 | 139 | error-ex@^1.3.1: 140 | version "1.3.2" 141 | resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" 142 | integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== 143 | dependencies: 144 | is-arrayish "^0.2.1" 145 | 146 | estree-walker@^0.6.1: 147 | version "0.6.1" 148 | resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.1.tgz#53049143f40c6eb918b23671d1fe3219f3a1b362" 149 | integrity sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w== 150 | 151 | find-up@^2.0.0: 152 | version "2.1.0" 153 | resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" 154 | integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= 155 | dependencies: 156 | locate-path "^2.0.0" 157 | 158 | fs-extra@8.1.0: 159 | version "8.1.0" 160 | resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" 161 | integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== 162 | dependencies: 163 | graceful-fs "^4.2.0" 164 | jsonfile "^4.0.0" 165 | universalify "^0.1.0" 166 | 167 | fs.realpath@^1.0.0: 168 | version "1.0.0" 169 | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" 170 | integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= 171 | 172 | glob@^7.0.3, glob@^7.1.3: 173 | version "7.1.4" 174 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" 175 | integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A== 176 | dependencies: 177 | fs.realpath "^1.0.0" 178 | inflight "^1.0.4" 179 | inherits "2" 180 | minimatch "^3.0.4" 181 | once "^1.3.0" 182 | path-is-absolute "^1.0.0" 183 | 184 | globby@^6.1.0: 185 | version "6.1.0" 186 | resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" 187 | integrity sha1-9abXDoOV4hyFj7BInWTfAkJNUGw= 188 | dependencies: 189 | array-union "^1.0.1" 190 | glob "^7.0.3" 191 | object-assign "^4.0.1" 192 | pify "^2.0.0" 193 | pinkie-promise "^2.0.0" 194 | 195 | graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0: 196 | version "4.2.0" 197 | resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.0.tgz#8d8fdc73977cb04104721cb53666c1ca64cd328b" 198 | integrity sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg== 199 | 200 | hosted-git-info@^2.1.4: 201 | version "2.7.1" 202 | resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" 203 | integrity sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w== 204 | 205 | indent-string@^3.0.0: 206 | version "3.2.0" 207 | resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289" 208 | integrity sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok= 209 | 210 | inflight@^1.0.4: 211 | version "1.0.6" 212 | resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" 213 | integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= 214 | dependencies: 215 | once "^1.3.0" 216 | wrappy "1" 217 | 218 | inherits@2: 219 | version "2.0.4" 220 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" 221 | integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== 222 | 223 | is-arrayish@^0.2.1: 224 | version "0.2.1" 225 | resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" 226 | integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= 227 | 228 | is-path-cwd@^2.0.0: 229 | version "2.2.0" 230 | resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-2.2.0.tgz#67d43b82664a7b5191fd9119127eb300048a9fdb" 231 | integrity sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ== 232 | 233 | is-path-in-cwd@^2.0.0: 234 | version "2.1.0" 235 | resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-2.1.0.tgz#bfe2dca26c69f397265a4009963602935a053acb" 236 | integrity sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ== 237 | dependencies: 238 | is-path-inside "^2.1.0" 239 | 240 | is-path-inside@^2.1.0: 241 | version "2.1.0" 242 | resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-2.1.0.tgz#7c9810587d659a40d27bcdb4d5616eab059494b2" 243 | integrity sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg== 244 | dependencies: 245 | path-is-inside "^1.0.2" 246 | 247 | is-plain-obj@^1.1.0: 248 | version "1.1.0" 249 | resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" 250 | integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= 251 | 252 | json-parse-better-errors@^1.0.1: 253 | version "1.0.2" 254 | resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" 255 | integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== 256 | 257 | jsonfile@^4.0.0: 258 | version "4.0.0" 259 | resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" 260 | integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= 261 | optionalDependencies: 262 | graceful-fs "^4.1.6" 263 | 264 | load-json-file@^4.0.0: 265 | version "4.0.0" 266 | resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" 267 | integrity sha1-L19Fq5HjMhYjT9U62rZo607AmTs= 268 | dependencies: 269 | graceful-fs "^4.1.2" 270 | parse-json "^4.0.0" 271 | pify "^3.0.0" 272 | strip-bom "^3.0.0" 273 | 274 | locate-path@^2.0.0: 275 | version "2.0.0" 276 | resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" 277 | integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= 278 | dependencies: 279 | p-locate "^2.0.0" 280 | path-exists "^3.0.0" 281 | 282 | loud-rejection@^1.0.0: 283 | version "1.6.0" 284 | resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" 285 | integrity sha1-W0b4AUft7leIcPCG0Eghz5mOVR8= 286 | dependencies: 287 | currently-unhandled "^0.4.1" 288 | signal-exit "^3.0.0" 289 | 290 | map-obj@^1.0.0: 291 | version "1.0.1" 292 | resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" 293 | integrity sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0= 294 | 295 | map-obj@^2.0.0: 296 | version "2.0.0" 297 | resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-2.0.0.tgz#a65cd29087a92598b8791257a523e021222ac1f9" 298 | integrity sha1-plzSkIepJZi4eRJXpSPgISIqwfk= 299 | 300 | meow@^5.0.0: 301 | version "5.0.0" 302 | resolved "https://registry.yarnpkg.com/meow/-/meow-5.0.0.tgz#dfc73d63a9afc714a5e371760eb5c88b91078aa4" 303 | integrity sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig== 304 | dependencies: 305 | camelcase-keys "^4.0.0" 306 | decamelize-keys "^1.0.0" 307 | loud-rejection "^1.0.0" 308 | minimist-options "^3.0.1" 309 | normalize-package-data "^2.3.4" 310 | read-pkg-up "^3.0.0" 311 | redent "^2.0.0" 312 | trim-newlines "^2.0.0" 313 | yargs-parser "^10.0.0" 314 | 315 | minimatch@^3.0.4: 316 | version "3.0.4" 317 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" 318 | integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== 319 | dependencies: 320 | brace-expansion "^1.1.7" 321 | 322 | minimist-options@^3.0.1: 323 | version "3.0.2" 324 | resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-3.0.2.tgz#fba4c8191339e13ecf4d61beb03f070103f3d954" 325 | integrity sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ== 326 | dependencies: 327 | arrify "^1.0.1" 328 | is-plain-obj "^1.1.0" 329 | 330 | normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: 331 | version "2.5.0" 332 | resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" 333 | integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== 334 | dependencies: 335 | hosted-git-info "^2.1.4" 336 | resolve "^1.10.0" 337 | semver "2 || 3 || 4 || 5" 338 | validate-npm-package-license "^3.0.1" 339 | 340 | object-assign@^4.0.1: 341 | version "4.1.1" 342 | resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" 343 | integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= 344 | 345 | once@^1.3.0: 346 | version "1.4.0" 347 | resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" 348 | integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= 349 | dependencies: 350 | wrappy "1" 351 | 352 | p-limit@^1.1.0: 353 | version "1.3.0" 354 | resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" 355 | integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== 356 | dependencies: 357 | p-try "^1.0.0" 358 | 359 | p-locate@^2.0.0: 360 | version "2.0.0" 361 | resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" 362 | integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= 363 | dependencies: 364 | p-limit "^1.1.0" 365 | 366 | p-map@^2.0.0: 367 | version "2.1.0" 368 | resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175" 369 | integrity sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw== 370 | 371 | p-try@^1.0.0: 372 | version "1.0.0" 373 | resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" 374 | integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= 375 | 376 | parse-json@^4.0.0: 377 | version "4.0.0" 378 | resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" 379 | integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= 380 | dependencies: 381 | error-ex "^1.3.1" 382 | json-parse-better-errors "^1.0.1" 383 | 384 | path-exists@^3.0.0: 385 | version "3.0.0" 386 | resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" 387 | integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= 388 | 389 | path-is-absolute@^1.0.0: 390 | version "1.0.1" 391 | resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" 392 | integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= 393 | 394 | path-is-inside@^1.0.2: 395 | version "1.0.2" 396 | resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" 397 | integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= 398 | 399 | path-parse@^1.0.6: 400 | version "1.0.6" 401 | resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" 402 | integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== 403 | 404 | path-type@^3.0.0: 405 | version "3.0.0" 406 | resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" 407 | integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg== 408 | dependencies: 409 | pify "^3.0.0" 410 | 411 | pify@^2.0.0: 412 | version "2.3.0" 413 | resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" 414 | integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= 415 | 416 | pify@^3.0.0: 417 | version "3.0.0" 418 | resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" 419 | integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= 420 | 421 | pify@^4.0.1: 422 | version "4.0.1" 423 | resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" 424 | integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== 425 | 426 | pinkie-promise@^2.0.0: 427 | version "2.0.1" 428 | resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" 429 | integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= 430 | dependencies: 431 | pinkie "^2.0.0" 432 | 433 | pinkie@^2.0.0: 434 | version "2.0.4" 435 | resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" 436 | integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= 437 | 438 | prettier@^1.18.2: 439 | version "1.18.2" 440 | resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.18.2.tgz#6823e7c5900017b4bd3acf46fe9ac4b4d7bda9ea" 441 | integrity sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw== 442 | 443 | quick-lru@^1.0.0: 444 | version "1.1.0" 445 | resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-1.1.0.tgz#4360b17c61136ad38078397ff11416e186dcfbb8" 446 | integrity sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g= 447 | 448 | read-pkg-up@^3.0.0: 449 | version "3.0.0" 450 | resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-3.0.0.tgz#3ed496685dba0f8fe118d0691dc51f4a1ff96f07" 451 | integrity sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc= 452 | dependencies: 453 | find-up "^2.0.0" 454 | read-pkg "^3.0.0" 455 | 456 | read-pkg@^3.0.0: 457 | version "3.0.0" 458 | resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" 459 | integrity sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k= 460 | dependencies: 461 | load-json-file "^4.0.0" 462 | normalize-package-data "^2.3.2" 463 | path-type "^3.0.0" 464 | 465 | redent@^2.0.0: 466 | version "2.0.0" 467 | resolved "https://registry.yarnpkg.com/redent/-/redent-2.0.0.tgz#c1b2007b42d57eb1389079b3c8333639d5e1ccaa" 468 | integrity sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo= 469 | dependencies: 470 | indent-string "^3.0.0" 471 | strip-indent "^2.0.0" 472 | 473 | resolve@1.11.1, resolve@^1.10.0: 474 | version "1.11.1" 475 | resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.11.1.tgz#ea10d8110376982fef578df8fc30b9ac30a07a3e" 476 | integrity sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw== 477 | dependencies: 478 | path-parse "^1.0.6" 479 | 480 | rimraf@^2.6.3: 481 | version "2.6.3" 482 | resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" 483 | integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== 484 | dependencies: 485 | glob "^7.1.3" 486 | 487 | rollup-plugin-typescript2@^0.22.1: 488 | version "0.22.1" 489 | resolved "https://registry.yarnpkg.com/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.22.1.tgz#7678b7decc6808e600ff36c32febd31081b55405" 490 | integrity sha512-SQEHr1s0kDWrNV3UKySZtYKFIcWCJh2PQ4ZtLNj18pf50SrxeRDlUksOOeLPyodJ7bVLaKwWDbiobF2a6gfKyg== 491 | dependencies: 492 | fs-extra "8.1.0" 493 | resolve "1.11.1" 494 | rollup-pluginutils "2.8.1" 495 | tslib "1.10.0" 496 | 497 | rollup-pluginutils@2.8.1: 498 | version "2.8.1" 499 | resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.8.1.tgz#8fa6dd0697344938ef26c2c09d2488ce9e33ce97" 500 | integrity sha512-J5oAoysWar6GuZo0s+3bZ6sVZAC0pfqKz68De7ZgDi5z63jOVZn1uJL/+z1jeKHNbGII8kAyHF5q8LnxSX5lQg== 501 | dependencies: 502 | estree-walker "^0.6.1" 503 | 504 | rollup@^1.17.0: 505 | version "1.17.0" 506 | resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.17.0.tgz#47ee8b04514544fc93b39bae06271244c8db7dfa" 507 | integrity sha512-k/j1m0NIsI4SYgCJR4MWPstGJOWfJyd6gycKoMhyoKPVXxm+L49XtbUwZyFsrSU2YXsOkM4u1ll9CS/ZgJBUpw== 508 | dependencies: 509 | "@types/estree" "0.0.39" 510 | "@types/node" "^12.6.2" 511 | acorn "^6.2.0" 512 | 513 | "semver@2 || 3 || 4 || 5": 514 | version "5.7.0" 515 | resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" 516 | integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA== 517 | 518 | signal-exit@^3.0.0: 519 | version "3.0.2" 520 | resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" 521 | integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= 522 | 523 | source-map@~0.6.1: 524 | version "0.6.1" 525 | resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" 526 | integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== 527 | 528 | spdx-correct@^3.0.0: 529 | version "3.1.0" 530 | resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" 531 | integrity sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q== 532 | dependencies: 533 | spdx-expression-parse "^3.0.0" 534 | spdx-license-ids "^3.0.0" 535 | 536 | spdx-exceptions@^2.1.0: 537 | version "2.2.0" 538 | resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977" 539 | integrity sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA== 540 | 541 | spdx-expression-parse@^3.0.0: 542 | version "3.0.0" 543 | resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" 544 | integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== 545 | dependencies: 546 | spdx-exceptions "^2.1.0" 547 | spdx-license-ids "^3.0.0" 548 | 549 | spdx-license-ids@^3.0.0: 550 | version "3.0.5" 551 | resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654" 552 | integrity sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q== 553 | 554 | strip-bom@^3.0.0: 555 | version "3.0.0" 556 | resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" 557 | integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= 558 | 559 | strip-indent@^2.0.0: 560 | version "2.0.0" 561 | resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" 562 | integrity sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g= 563 | 564 | trim-newlines@^2.0.0: 565 | version "2.0.0" 566 | resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-2.0.0.tgz#b403d0b91be50c331dfc4b82eeceb22c3de16d20" 567 | integrity sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA= 568 | 569 | tslib@1.10.0: 570 | version "1.10.0" 571 | resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" 572 | integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ== 573 | 574 | typescript@^3.5.3: 575 | version "3.5.3" 576 | resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.3.tgz#c830f657f93f1ea846819e929092f5fe5983e977" 577 | integrity sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g== 578 | 579 | uglify-es@^3.3.9: 580 | version "3.3.9" 581 | resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.9.tgz#0c1c4f0700bed8dbc124cdb304d2592ca203e677" 582 | integrity sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ== 583 | dependencies: 584 | commander "~2.13.0" 585 | source-map "~0.6.1" 586 | 587 | universalify@^0.1.0: 588 | version "0.1.2" 589 | resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" 590 | integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== 591 | 592 | validate-npm-package-license@^3.0.1: 593 | version "3.0.4" 594 | resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" 595 | integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== 596 | dependencies: 597 | spdx-correct "^3.0.0" 598 | spdx-expression-parse "^3.0.0" 599 | 600 | wrappy@1: 601 | version "1.0.2" 602 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" 603 | integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= 604 | 605 | yargs-parser@^10.0.0: 606 | version "10.1.0" 607 | resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8" 608 | integrity sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ== 609 | dependencies: 610 | camelcase "^4.1.0" 611 | --------------------------------------------------------------------------------