@bitfiber/utils 1.0.0 → 1.0.1

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.
@@ -1,127 +1,127 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- We as members, contributors, and leaders pledge to make participation in our
6
- community a harassment-free experience for everyone, regardless of age, body
7
- size, visible or invisible disability, ethnicity, sex characteristics, gender
8
- identity and expression, level of experience, education, socio-economic status,
9
- nationality, personal appearance, race, religion, or sexual identity
10
- and orientation.
11
-
12
- We pledge to act and interact in ways that contribute to an open, welcoming,
13
- diverse, inclusive, and healthy community.
14
-
15
- ## Our Standards
16
-
17
- Examples of behavior that contributes to a positive environment for our
18
- community include:
19
-
20
- * Demonstrating empathy and kindness toward other people
21
- * Being respectful of differing opinions, viewpoints, and experiences
22
- * Giving and gracefully accepting constructive feedback
23
- * Accepting responsibility and apologizing to those affected by our mistakes,
24
- and learning from the experience
25
- * Focusing on what is best not just for us as individuals, but for the
26
- overall community
27
-
28
- Examples of unacceptable behavior include:
29
-
30
- * The use of sexualized language or imagery, and sexual attention or
31
- advances of any kind
32
- * Trolling, insulting or derogatory comments, and personal or political attacks
33
- * Public or private harassment
34
- * Publishing others' private information, such as a physical or email
35
- address, without their explicit permission
36
- * Other conduct which could reasonably be considered inappropriate in a
37
- professional setting
38
-
39
- ## Enforcement Responsibilities
40
-
41
- Community leaders are responsible for clarifying and enforcing our standards of
42
- acceptable behavior and will take appropriate and fair corrective action in
43
- response to any behavior that they deem inappropriate, threatening, offensive,
44
- or harmful.
45
-
46
- Community leaders have the right and responsibility to remove, edit, or reject
47
- comments, commits, code, wiki edits, issues, and other contributions that are
48
- not aligned to this Code of Conduct, and will communicate reasons for moderation
49
- decisions when appropriate.
50
-
51
- ## Scope
52
-
53
- This Code of Conduct applies within all community spaces, and also applies when
54
- an individual is officially representing the community in public spaces.
55
- Examples of representing our community include using an official e-mail address,
56
- posting via an official social media account, or acting as an appointed
57
- representative at an online or offline event.
58
-
59
- ## Enforcement
60
-
61
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
- reported to the community leaders responsible for enforcement at bitfiber.web@gmail.com.
63
- All complaints will be reviewed and investigated promptly and fairly.
64
-
65
- All community leaders are obligated to respect the privacy and security of the
66
- reporter of any incident.
67
-
68
- ## Enforcement Guidelines
69
-
70
- Community leaders will follow these Community Impact Guidelines in determining
71
- the consequences for any action they deem in violation of this Code of Conduct:
72
-
73
- ### 1. Correction
74
-
75
- **Community Impact**: Use of inappropriate language or other behavior deemed
76
- unprofessional or unwelcome in the community.
77
-
78
- **Consequence**: A private, written warning from community leaders, providing
79
- clarity around the nature of the violation and an explanation of why the
80
- behavior was inappropriate. A public apology may be requested.
81
-
82
- ### 2. Warning
83
-
84
- **Community Impact**: A violation through a single incident or series
85
- of actions.
86
-
87
- **Consequence**: A warning with consequences for continued behavior. No
88
- interaction with the people involved, including unsolicited interaction with
89
- those enforcing the Code of Conduct, for a specified period of time. This
90
- includes avoiding interactions in community spaces as well as external channels
91
- like social media. Violating these terms may lead to a temporary or
92
- permanent ban.
93
-
94
- ### 3. Temporary Ban
95
-
96
- **Community Impact**: A serious violation of community standards, including
97
- sustained inappropriate behavior.
98
-
99
- **Consequence**: A temporary ban from any sort of interaction or public
100
- communication with the community for a specified period of time. No public or
101
- private interaction with the people involved, including unsolicited interaction
102
- with those enforcing the Code of Conduct, is allowed during this period.
103
- Violating these terms may lead to a permanent ban.
104
-
105
- ### 4. Permanent Ban
106
-
107
- **Community Impact**: Demonstrating a pattern of violation of community
108
- standards, including sustained inappropriate behavior, harassment of an
109
- individual, or aggression toward or disparagement of classes of individuals.
110
-
111
- **Consequence**: A permanent ban from any sort of public interaction within
112
- the community.
113
-
114
- ## Attribution
115
-
116
- This Code of Conduct is adapted from the [Contributor Covenant][homepage],
117
- version 2.0, available at
118
- https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
119
-
120
- Community Impact Guidelines were inspired by [Mozilla's code of conduct
121
- enforcement ladder](https://github.com/mozilla/diversity).
122
-
123
- [homepage]: https://www.contributor-covenant.org
124
-
125
- For answers to common questions about this code of conduct, see the FAQ at
126
- https://www.contributor-covenant.org/faq. Translations are available at
127
- https://www.contributor-covenant.org/translations.
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, religion, or sexual identity
10
+ and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the
26
+ overall community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or
31
+ advances of any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email
35
+ address, without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official e-mail address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at bitfiber.web@gmail.com.
63
+ All complaints will be reviewed and investigated promptly and fairly.
64
+
65
+ All community leaders are obligated to respect the privacy and security of the
66
+ reporter of any incident.
67
+
68
+ ## Enforcement Guidelines
69
+
70
+ Community leaders will follow these Community Impact Guidelines in determining
71
+ the consequences for any action they deem in violation of this Code of Conduct:
72
+
73
+ ### 1. Correction
74
+
75
+ **Community Impact**: Use of inappropriate language or other behavior deemed
76
+ unprofessional or unwelcome in the community.
77
+
78
+ **Consequence**: A private, written warning from community leaders, providing
79
+ clarity around the nature of the violation and an explanation of why the
80
+ behavior was inappropriate. A public apology may be requested.
81
+
82
+ ### 2. Warning
83
+
84
+ **Community Impact**: A violation through a single incident or series
85
+ of actions.
86
+
87
+ **Consequence**: A warning with consequences for continued behavior. No
88
+ interaction with the people involved, including unsolicited interaction with
89
+ those enforcing the Code of Conduct, for a specified period of time. This
90
+ includes avoiding interactions in community spaces as well as external channels
91
+ like social media. Violating these terms may lead to a temporary or
92
+ permanent ban.
93
+
94
+ ### 3. Temporary Ban
95
+
96
+ **Community Impact**: A serious violation of community standards, including
97
+ sustained inappropriate behavior.
98
+
99
+ **Consequence**: A temporary ban from any sort of interaction or public
100
+ communication with the community for a specified period of time. No public or
101
+ private interaction with the people involved, including unsolicited interaction
102
+ with those enforcing the Code of Conduct, is allowed during this period.
103
+ Violating these terms may lead to a permanent ban.
104
+
105
+ ### 4. Permanent Ban
106
+
107
+ **Community Impact**: Demonstrating a pattern of violation of community
108
+ standards, including sustained inappropriate behavior, harassment of an
109
+ individual, or aggression toward or disparagement of classes of individuals.
110
+
111
+ **Consequence**: A permanent ban from any sort of public interaction within
112
+ the community.
113
+
114
+ ## Attribution
115
+
116
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
117
+ version 2.0, available at
118
+ https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
119
+
120
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct
121
+ enforcement ladder](https://github.com/mozilla/diversity).
122
+
123
+ [homepage]: https://www.contributor-covenant.org
124
+
125
+ For answers to common questions about this code of conduct, see the FAQ at
126
+ https://www.contributor-covenant.org/faq. Translations are available at
127
+ https://www.contributor-covenant.org/translations.
package/CONTRIBUTING.md CHANGED
@@ -1,87 +1,109 @@
1
- # Contributing Guidelines
2
-
3
- Thank you for considering contributing to our "@bitfiber/utils" library!
4
- We welcome contributions from the community to help improve and expand the functionality of our library.
5
- By contributing, you can help make our library more useful for developers across different projects and domains.
6
-
7
- ## Code of Conduct
8
-
9
- Before getting started, please review
10
- our [Code of Conduct](https://github.com/bitfiber/utils/blob/main/CODE_OF_CONDUCT.md) to understand the behavior that is
11
- expected of all contributors.
12
-
13
- ## Getting Started
14
-
15
- To contribute to our "@bitfiber/utils" library, follow these steps:
16
-
17
- 1. Fork the [GitHub Repository](https://github.com/bitfiber/utils) to your own GitHub account.
18
-
19
- 2. Clone the forked repository to your local machine.
20
-
21
- 3. Create a new branch,
22
- see [guide](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository).
23
- Branch naming conventions:
24
-
25
- - For features: `feature/<your-feature-branch-name>`
26
- - For bug fixes: `fix/<your-bugfix-branch-name>`.
27
- - For tests: `tests/<your-tests-branch-name>`.
28
- - For docs: `docs/<your-docs-branch-name>`.
29
- - For refactoring: `refactor/<your-refactoring-branch-name>`
30
- - For performance improving: `perf/<your-performance-branch-name>`
31
-
32
- 4. Switch to the newly created branch.
33
-
34
- 5. Go into repository folder by running:
35
-
36
- ```bash
37
- cd utils
38
- ```
39
-
40
- 6. Install dependencies by running:
41
-
42
- ```bash
43
- npm install
44
- ```
45
-
46
- 7. Make your changes, following the guidelines and best practices outlined below.
47
-
48
- 8. Run tests to ensure that your changes haven't introduced any regressions by running:
49
-
50
- ```bash
51
- nx test utils
52
- ```
53
-
54
- 9. Push your changes to your forked repository.
55
-
56
- 10. Submit a pull request (PR) to the [repository`s main branch](https://github.com/bitfiber/utils/tree/main),
57
- explaining the purpose and scope of your changes.
58
-
59
- ## Guidelines and Best Practices
60
-
61
- To ensure that your contributions are accepted and integrated smoothly, please adhere to the following guidelines and
62
- best practices:
63
-
64
- * **Follow the Style Guide**: Maintain consistency with the existing codebase by following our eslint coding style.
65
-
66
- * **Write Tests**: Ensure that your changes are covered by tests. Write unit tests for new functionality and update
67
- existing tests for changes to ensure full test coverage.
68
-
69
- * **Document Changes**: Provide clear and concise documentation for any new functionality or changes made to existing
70
- functionality. This includes updating README.md, adding JSDoc comments, and any other relevant documentation.
71
-
72
- * **Keep PRs Small and Focused**: Submit separate PRs for each logical change or set of related changes. This makes it
73
- easier to review and merge your contributions.
74
-
75
- * **Be Responsive**: Be responsive to feedback and comments on your PRs. Address any review comments promptly and make
76
- necessary adjustments to your code.
77
-
78
- * **Respect Licensing**: Ensure that your contributions adhere to the licensing terms of the project. If you're
79
- introducing dependencies with different licenses, make sure they are compatible with our project's license.
80
-
81
- ## Need Help?
82
-
83
- If you need any assistance or have questions about contributing, feel free to reach out to us
84
- via [our community discussion forum](https://github.com/bitfiber/utils/discussions). We're here to help!
85
-
86
- Thank you for your interest in contributing to our "@bitfiber/utils" library.
87
- We appreciate your support and look forward to your contributions!
1
+ # Contributing Guidelines
2
+
3
+ Thank you for considering contributing to our "@bitfiber/utils" library!
4
+ We welcome contributions from the community to help improve and expand the functionality of our library.
5
+ By contributing, you can help make our library more useful for developers across different projects and domains.
6
+
7
+ ## Code of Conduct
8
+
9
+ Before getting started, please review
10
+ our [Code of Conduct](https://github.com/bitfiber/utils/blob/main/CODE_OF_CONDUCT.md) to understand the behavior that is
11
+ expected of all contributors.
12
+
13
+ ## Getting Started
14
+
15
+ To contribute to our "@bitfiber/utils" library, follow these steps:
16
+
17
+ 1. Fork the [GitHub Repository](https://github.com/bitfiber/utils) to your own GitHub account.
18
+
19
+ 2. Clone the forked repository to your local machine.
20
+
21
+ 3. Create a new branch,
22
+ see [guide](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository).
23
+ Branch naming conventions:
24
+
25
+ - For features: `feature/<your-feature-branch-name>`
26
+ - For bug fixes: `fix/<your-bugfix-branch-name>`.
27
+ - For tests: `tests/<your-tests-branch-name>`.
28
+ - For docs: `docs/<your-docs-branch-name>`.
29
+ - For refactoring: `refactor/<your-refactoring-branch-name>`
30
+ - For performance improving: `perf/<your-performance-branch-name>`
31
+
32
+ 4. Switch to the newly created branch.
33
+
34
+ 5. Go into repository folder by running:
35
+
36
+ ```bash
37
+ cd utils
38
+ ```
39
+ 6. Install Node.js using nvm:
40
+ `<version>` - take the Node.js version
41
+ from [nx node versions](https://nx.dev/nx-api/workspace/documents/nx-nodejs-typescript-version-matrix) considering
42
+ the nx version in package.json
43
+
44
+ ```bash
45
+ nvm install <version>
46
+ nvm use <version>
47
+ ```
48
+
49
+ 7. Install nx globally:
50
+ `<version>` - version as in package.json
51
+
52
+ ```bash
53
+ npm add --global nx@<version>
54
+ ```
55
+
56
+ 8. Install dependencies by running:
57
+
58
+ ```bash
59
+ npm install
60
+ ```
61
+
62
+ 9. Make your changes, following the guidelines and best practices outlined below.
63
+
64
+ 10. Run tests to ensure that your changes haven't introduced any regressions by running:
65
+
66
+ ```bash
67
+ nx test utils
68
+ ```
69
+
70
+ 11. Ensure your code adheres to the style guidelines by running ESLint:
71
+
72
+ ```bash
73
+ nx lint utils
74
+ ```
75
+
76
+ 12. Push your changes to your forked repository.
77
+
78
+ 13. Submit a pull request (PR) to the [repository`s main branch](https://github.com/bitfiber/utils/tree/main),
79
+ explaining the purpose and scope of your changes.
80
+
81
+ ## Guidelines and Best Practices
82
+
83
+ To ensure that your contributions are accepted and integrated smoothly, please adhere to the following guidelines and
84
+ best practices:
85
+
86
+ * **Follow the Style Guide**: Maintain consistency with the existing codebase by following our eslint coding style.
87
+
88
+ * **Write Tests**: Ensure that your changes are covered by tests. Write unit tests for new functionality and update
89
+ existing tests for changes to ensure full test coverage.
90
+
91
+ * **Document Changes**: Provide clear and concise documentation for any new functionality or changes made to existing
92
+ functionality. This includes updating README.md, adding JSDoc comments, and any other relevant documentation.
93
+
94
+ * **Keep PRs Small and Focused**: Submit separate PRs for each logical change or set of related changes. This makes it
95
+ easier to review and merge your contributions.
96
+
97
+ * **Be Responsive**: Be responsive to feedback and comments on your PRs. Address any review comments promptly and make
98
+ necessary adjustments to your code.
99
+
100
+ * **Respect Licensing**: Ensure that your contributions adhere to the licensing terms of the project. If you're
101
+ introducing dependencies with different licenses, make sure they are compatible with our project's license.
102
+
103
+ ## Need Help?
104
+
105
+ If you need any assistance or have questions about contributing, feel free to reach out to us
106
+ via [our community discussion forum](https://github.com/bitfiber/utils/discussions). We're here to help!
107
+
108
+ Thank you for your interest in contributing to our "@bitfiber/utils" library.
109
+ We appreciate your support and look forward to your contributions!
package/index.d.ts CHANGED
@@ -1 +1,7 @@
1
1
  export * from './common';
2
+ export * from './num';
3
+ export * from './str';
4
+ export * from './obj';
5
+ export * from './arr';
6
+ export * from './dom';
7
+ export * from './env';
package/index.js CHANGED
@@ -1,2 +1,8 @@
1
1
  export * from './common';
2
+ export * from './num';
3
+ export * from './str';
4
+ export * from './obj';
5
+ export * from './arr';
6
+ export * from './dom';
7
+ export * from './env';
2
8
  //# sourceMappingURL=index.js.map
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../package/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../package/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitfiber/utils",
3
3
  "description": "Collection of versatile utility functions for Javascript",
4
- "version": "1.0.0",
4
+ "version": "1.0.1",
5
5
  "type": "module",
6
6
  "module": "./src/index.js",
7
7
  "main": "./index.js",