pepka 0.12.2 → 0.13.0-b1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.circleci/config.yml +19 -19
- package/.github/ISSUE_TEMPLATE/bug_report.md +38 -38
- package/.github/ISSUE_TEMPLATE/feature_request.md +20 -20
- package/CODE_OF_CONDUCT.md +76 -76
- package/CONTRIBUTING.md +3 -3
- package/LICENSE +21 -21
- package/README.md +36 -10
- package/dist/bundle.d.ts +18 -11
- package/dist/bundle.dev.js +119 -77
- package/dist/bundle.js +1 -1
- package/dist/es/quick.js +1 -0
- package/dist/es/types.js +1 -0
- package/package.json +14 -16
- package/rollup.config.js +34 -33
- package/src/common.ts +14 -14
- package/src/curry.ts +99 -53
- package/src/index.ts +6 -5
- package/src/quick.ts +98 -97
- package/src/safe.ts +392 -404
- package/src/types.ts +14 -7
- package/src/uncurry.ts +11 -0
- package/src/utils.ts +11 -11
- package/test/in-browser.ts +3 -3
- package/test/workbench.html +9 -9
- package/tsconfig.json +18 -20
- package/tslint.json +24 -24
package/.circleci/config.yml
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
version: 2
|
|
3
|
-
|
|
4
|
-
jobs:
|
|
5
|
-
build:
|
|
6
|
-
working_directory: ~/test
|
|
7
|
-
docker:
|
|
8
|
-
- image: circleci/node
|
|
9
|
-
steps:
|
|
10
|
-
- checkout
|
|
11
|
-
- run:
|
|
12
|
-
name: install
|
|
13
|
-
command: npm i
|
|
14
|
-
- run:
|
|
15
|
-
name: npm test
|
|
16
|
-
command: |
|
|
17
|
-
nodejs -v
|
|
18
|
-
npm -v
|
|
19
|
-
npm run lint
|
|
1
|
+
|
|
2
|
+
version: 2
|
|
3
|
+
|
|
4
|
+
jobs:
|
|
5
|
+
build:
|
|
6
|
+
working_directory: ~/test
|
|
7
|
+
docker:
|
|
8
|
+
- image: circleci/node
|
|
9
|
+
steps:
|
|
10
|
+
- checkout
|
|
11
|
+
- run:
|
|
12
|
+
name: install
|
|
13
|
+
command: npm i
|
|
14
|
+
- run:
|
|
15
|
+
name: npm test
|
|
16
|
+
command: |
|
|
17
|
+
nodejs -v
|
|
18
|
+
npm -v
|
|
19
|
+
npm run lint
|
|
20
20
|
npm run test:report
|
|
@@ -1,38 +1,38 @@
|
|
|
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.
|
|
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.
|
|
@@ -1,20 +1,20 @@
|
|
|
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.
|
|
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.
|
package/CODE_OF_CONDUCT.md
CHANGED
|
@@ -1,76 +1,76 @@
|
|
|
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 akiliev@outlook.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
|
|
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 akiliev@outlook.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
|
package/CONTRIBUTING.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
- Make an issue of what you want to archieve: let's be communicative.
|
|
2
|
-
- Describe how does it affect API, bundle size, performance.
|
|
3
|
-
- Create, write tests where possible and make a PR.
|
|
1
|
+
- Make an issue of what you want to archieve: let's be communicative.
|
|
2
|
+
- Describe how does it affect API, bundle size, performance.
|
|
3
|
+
- Create, write tests where possible and make a PR.
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2019 Michael
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019 Michael
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,10 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
HI! Meet pepka - JavaScript/TypeScript functional programming utility library named after my parakeet.
|
|
4
|
+
|
|
5
|
+
This lib is intended to be a functional toolkit more flexible than ramda is.
|
|
6
|
+
Its' basic API is similimar to ramda's one.
|
|
7
|
+
Other goals are:
|
|
8
|
+
- Async pipes. They are very handy, but are not 100% pure in terms of Haskell c:
|
|
9
|
+
- Most flexible types possible (Let'em be any better than crashing because of their failures. I'm currently working on full JSDocs and better basic types).
|
|
10
|
+
- Tree-shakeble and smallest possible. What could be native, is native.
|
|
11
|
+
- Has "quick" alternatives of most computation-heavy functions with `q` prefix which are not completely safe by fp means: most of them do mutations and it may be needed to `clone` or `cloneShallow` data in a first pipe of `compose(...)`.
|
|
12
|
+
- Has basic toolbelt-types like AnyObject and AnyFunc<ReturnType?, [...args]?> etc.
|
|
13
|
+
- Has some basic additinal must-have stuff that ramda does not.
|
|
14
|
+
|
|
15
|
+
Full docs are coming,
|
|
16
|
+
please reference ramda's ones for most operations and examples: https://ramdajs.com/docs/
|
|
17
|
+
|
|
18
|
+
Basic API differences:
|
|
19
|
+
- clone() clones deeply as possible any type possible.
|
|
20
|
+
- cloneShallow() clones only by 1st level of folding also any type possible.
|
|
21
|
+
- mergeDeep - replaces arrays.
|
|
22
|
+
- mergeDeepX - replaces its' elements with same indexes.
|
|
23
|
+
- mergeDeepAdd - adds new elements to arrays.
|
|
24
|
+
- type - returns type UpperCased of anything passed to it, including classes and typed arrays.
|
|
25
|
+
- mapKeys - changes existing keys and data by map or function like usual mapper.
|
|
26
|
+
- explore(label)(data) - `compose(explore('the number'))(42)` results in `'the number', 42` in console passing by the data.
|
|
27
|
+
- genBy(generator(index), length) - generates arrays.
|
|
28
|
+
- sizeof(array or object) - counts indexes of it.
|
|
29
|
+
- Aliases: mirror, reflect, echo = identity.
|
|
30
|
+
- Quicks: qappend, qassoc, qreduce, qmergeDeep, qmergeDeepX, qmergeDeepAdd, qmapKeys, qfilter
|
|
31
|
+
|
|
32
|
+
Async APIs:
|
|
33
|
+
- composeAsync - waits for a Promise if emitted by a pipe inside it.
|
|
34
|
+
- waitAll = Promise.all
|
|
35
|
+
- forEachAsync - runs a handler with all elements passed in parallel.
|
|
36
|
+
- forEachSerial - waits for a previous handler to resolve if Promise emitted.
|
package/dist/bundle.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
// Generated by dts-bundle-generator
|
|
1
|
+
// Generated by dts-bundle-generator v5.9.0
|
|
2
2
|
|
|
3
3
|
export declare type Args = any[];
|
|
4
|
-
|
|
4
|
+
declare const __: () => void;
|
|
5
5
|
export declare const curry: (fn: Function) => (...args: Args) => any;
|
|
6
6
|
export declare const toLower: (s: string) => string;
|
|
7
7
|
export declare const toUpper: (s: string) => string;
|
|
8
8
|
export declare const type: (s: any) => any;
|
|
9
|
-
export interface AnyObject {
|
|
10
|
-
[k: string]: any;
|
|
9
|
+
export interface AnyObject {
|
|
10
|
+
[k: string]: any;
|
|
11
11
|
}
|
|
12
12
|
export declare type AnyFunc = (...args: any[]) => any;
|
|
13
13
|
export declare const equals: (...args: any[]) => any;
|
|
@@ -24,23 +24,26 @@ export declare const add: (...args: any[]) => any;
|
|
|
24
24
|
export declare const subtract: (...args: any[]) => any;
|
|
25
25
|
export declare const flip: (fn: Function) => (...args: any[]) => any;
|
|
26
26
|
export declare const isNil: (s: any) => boolean;
|
|
27
|
-
export declare const length: (s:
|
|
27
|
+
export declare const length: (s: any[] | string) => number;
|
|
28
28
|
export declare const always: <T = any>(s: T) => () => T;
|
|
29
29
|
export declare const identity: (s: any) => any;
|
|
30
30
|
export declare const trim: (s: string) => string;
|
|
31
|
-
export declare const last: (s:
|
|
31
|
+
export declare const last: (s: any[] | string) => any;
|
|
32
32
|
export declare const not: (o: boolean) => boolean;
|
|
33
33
|
export declare const complement: (fn: AnyFunc) => (...args: any) => boolean | any;
|
|
34
|
-
export declare const keys: (o: any[]
|
|
35
|
-
export declare const values: (o: any[]
|
|
36
|
-
export declare const toPairs: (o: any[]
|
|
34
|
+
export declare const keys: (o: AnyObject | any[]) => string[];
|
|
35
|
+
export declare const values: (o: AnyObject | any[]) => any[];
|
|
36
|
+
export declare const toPairs: (o: AnyObject | any[]) => [
|
|
37
|
+
string,
|
|
38
|
+
any
|
|
39
|
+
][];
|
|
37
40
|
export declare const test: (...args: any[]) => any;
|
|
38
41
|
export declare const tap: (...args: any[]) => any;
|
|
39
42
|
export declare const append: (...args: any[]) => any;
|
|
40
43
|
export declare const split: (...args: any[]) => any;
|
|
41
44
|
export declare const T: (...args: any[]) => true;
|
|
42
45
|
export declare const F: (...args: any[]) => false;
|
|
43
|
-
export declare const sizeof: (s:
|
|
46
|
+
export declare const sizeof: (s: any[] | string | AnyObject) => number;
|
|
44
47
|
export declare const range: (...args: any[]) => any;
|
|
45
48
|
export declare const uniq: (xs: any[]) => any;
|
|
46
49
|
export declare const intersection: (...args: any[]) => any;
|
|
@@ -75,7 +78,10 @@ export declare const reduce: (...args: any[]) => any;
|
|
|
75
78
|
export declare const pickBy: (...args: any[]) => any;
|
|
76
79
|
export declare const pick: (...args: any[]) => any;
|
|
77
80
|
export declare const omit: (...args: any[]) => any;
|
|
78
|
-
export declare const fromPairs: (pairs: [
|
|
81
|
+
export declare const fromPairs: (pairs: [
|
|
82
|
+
string,
|
|
83
|
+
any
|
|
84
|
+
][]) => any;
|
|
79
85
|
export declare const concat: (...args: any[]) => any;
|
|
80
86
|
export declare const join: (...args: any[]) => any;
|
|
81
87
|
export declare const map: (...args: any[]) => any;
|
|
@@ -113,6 +119,7 @@ export declare const qmergeDeepAdd: any;
|
|
|
113
119
|
/** qmapKeys({ a: 'b' }, { a: 44 }) -> { b: 44 } */
|
|
114
120
|
export declare const qmapKeys: (...args: any[]) => any;
|
|
115
121
|
export declare const qfilter: (...args: any[]) => any;
|
|
122
|
+
/** @deprecated */
|
|
116
123
|
export declare const qindexOf: (...args: any[]) => any;
|
|
117
124
|
export declare type StrTmpl = ((data: AnyObject) => string);
|
|
118
125
|
export declare const getTmpl: (tmpl: string) => StrTmpl;
|