Skip to content

Commit 266891c

Browse files
committed
String 2.0.1
1 parent 12427b3 commit 266891c

9 files changed

+147
-4
lines changed

.github/CODE_OF_CONDUCT.md

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Code of Conduct
2+
3+
Like the technical community as a whole, the Faker Javascript team and community is made up of a mixture of professionals and volunteers from all over the world, working on every aspect of the mission - including mentorship, teaching, and connecting people.
4+
5+
Diversity is one of our strengths. With that, challenges will arise that can lead to communication issues and unhappiness. To that end, we have a few ground rules that we ask people to adhere to. This code applies equally to founders, mentors and those seeking help and guidance.
6+
7+
This isn’t an exhaustive list of things that you can’t do. Rather, take it in the spirit in which it’s intended - a guide to make it easier to enrich all of us and the technical communities in which we participate.
8+
9+
This code of conduct applies to all spaces used by the Faker Javascript community for communication. This includes Discord, GitHub, Twitter, Facebook, meetups, conferences, and any other relevant forums. Violations of this code outside of any spaces managed by the Faker Javascript team will still affect a person’s ability to participate within them.
10+
11+
If you believe someone is violating the code of conduct, we ask that you report it by contacting us from [support@flextype.org](mailto:[email protected]). We take all reports seriously, and your identity will remain confidential.
12+
13+
- **Be friendly and patient.**
14+
- **Be welcoming.** We strive to be a community that welcomes and supports people of all backgrounds and identities. This includes, but is not limited to members of any race, ethnicity, culture, national origin, colour, immigration status, social and economic class, educational level, sex, sexual orientation, gender identity and expression, age, size, family status, political belief, religion, and mental and physical ability.
15+
- **Be considerate.** Your work will be used by other people, and you in turn will depend on the work of others. Any decision you take will affect users and colleagues, and you should take those consequences into account when making decisions. Remember that we’re a world-wide community, so you might not be communicating in someone else’s primary language.
16+
- **Be respectful.** Not all of us will agree all the time, but disagreement is no excuse for poor behavior and poor manners. We might all experience some frustration now and then, but we cannot allow that frustration to turn into a personal attack. It’s important to remember that a community where people feel uncomfortable or threatened is not a productive one. Members of the Faker Javascript community should be respectful when dealing with other members as well as with people outside the Faker Javascript community.
17+
- **Be careful in the words that you choose.** We are a community of professionals, and we conduct ourselves professionally. Be kind to others. Do not insult or put down other participants. Harassment and other exclusionary behavior aren’t acceptable. This includes, but is not limited to:
18+
19+
- Violent threats or language directed against another person.
20+
- Discriminatory jokes and language.
21+
- Exclusionary gendered language (guys, gentlemen, bros, etc).
22+
- Posting sexually explicit or violent material.
23+
- Posting (or threatening to post) other people’s personally identifying information ("doxing").
24+
- Personal insults, especially those using racist or sexist terms.
25+
- Unwelcome sexual attention.
26+
- Advocating for, or encouraging, any of the above behavior.
27+
- Repeated harassment of others. In general, if someone asks you to stop, then stop.
28+
29+
- **When we disagree, try to understand why.** Disagreements, both social and technical, happen all the time and Faker Javascript is no exception. It is important that we resolve disagreements and differing views constructively. Remember that we’re different. The strength of Faker Javascript comes from its varied community, people from a wide range of backgrounds. Different people have different perspectives on issues. Being unable to understand why someone holds a viewpoint doesn’t mean that they’re wrong. Don’t forget that it is human to err and blaming each other doesn’t get us anywhere. Instead, focus on helping to resolve issues and learning from mistakes.
30+
31+
*Credits for the sources and inspiration of this code of conduct go to the [Speak Up! project.](http://web.archive.org/web/20141109123859/http://speakup.io/coc.html)*

.github/COMMIT_CONVENTION.md

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Git Commit Message Convention
2+
We have very precise rules over how our git commit messages can be formatted. This leads to more readable messages that are easy to follow when looking through the project history.
3+
4+
## Commit Message Format
5+
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
6+
format that includes a **type**, a **scope** and a **subject**:
7+
8+
```
9+
<type>(<scope>): <subject>
10+
<BLANK LINE>
11+
<body>
12+
<BLANK LINE>
13+
<footer>
14+
```
15+
16+
The **header** is mandatory and the **scope** of the header is optional.
17+
18+
Any line of the commit message cannot be longer 72 characters! This allows the message to be easier
19+
to read on GitHub as well as in various git tools.
20+
21+
The footer should contain a [closing reference to an issue](https://help.github.com/articles/closing-issues-via-commit-messages/) if any.
22+
23+
Samples: (even more [samples](https://github.com/faker-javascript/string/commits/master))
24+
25+
### Revert
26+
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
27+
28+
### Type
29+
The type of the made changes. Should be one of:
30+
* **feat** - some feature development
31+
* **fix** - bug fix
32+
* **docs** - changes in documentation
33+
* **style** - changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
34+
* **perf**: A code change that improves performance
35+
* **refactor** - changes those do not fix a bug or implement a feature. Simple refactoring
36+
* **test** - adding missing tests or correcting existing tests
37+
* **chore** - any other changes, not affecting code
38+
* **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
39+
40+
### Scope
41+
The scope could be anything specifying the place of the commit change. For example core, docs, etc...
42+
43+
### Subject
44+
The subject contains a succinct description of the change:
45+
46+
* use the imperative, present tense: "change" not "changed" nor "changes"
47+
* don't capitalize the first letter
48+
* no dot (.) at the end
49+
50+
### Body
51+
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
52+
The body should include the motivation for the change and contrast this with previous behavior.
53+
54+
### Footer
55+
The footer should contain any information about **Breaking Changes** and is also the place to
56+
reference GitHub issues that this commit **Closes**.
57+
58+
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.

.github/FUNDING.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# These are supported funding model platforms
2+
3+
patreon: awilum
4+
custom: ['https://paypal.me/awilum', 'https://qiwi.com/p/79805359141']

.github/ISSUE_TEMPLATE/bug_report.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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+
**Additional context**
27+
Add any other context about the problem here.
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +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.

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<a name="2.0.1"></a>
2+
# [2.0.1](https://github.com/faker-javascript/string) (2022-01-10)
3+
* GitHub docs updates.
4+
15
<a name="2.0.0"></a>
26
# [2.0.0](https://github.com/faker-javascript/string) (2022-01-09)
37

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ import string from '@fakerjs/string';
2020
string();
2121
//=> 3Kekravwvb78vP9CQPP1vaRCgi4dZETOktxzf8pF5gufFqh8mOICMqjRP4y8UxoI
2222

23-
string(10);
23+
string({length: 10});
2424
//=> FxvqHNFNUu
2525

26-
string(10, '#@$%&+=');
26+
string({length: 10, keyspace: '#@$%&+='});
2727
//=> $+#%#&$$=@
2828
```
2929

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@fakerjs/string",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"description": "String package provides functionality to generate a fake string value.",
55
"license": "MIT",
66
"repository": "faker-javascript/string",

test.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import string from './index.js';
22
import test from 'ava';
33

4-
//console.log(string({length: 10}));
54
test('string return type to be string', t => {
65
t.is(typeof string(), 'string');
76
});

0 commit comments

Comments
 (0)