orc-me 1.1.5 → 1.1.6
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/README.md +5 -5
- package/index.js +1 -1
- package/package.json +1 -1
- package/test/index.test.js +3 -2
package/README.md
CHANGED
|
@@ -21,17 +21,17 @@
|
|
|
21
21
|
# Examples
|
|
22
22
|
|
|
23
23
|
``` javascript
|
|
24
|
-
const orcMe = require(
|
|
24
|
+
const orcMe = require('orc-me');
|
|
25
25
|
|
|
26
26
|
function capitalizeFirstLetter(string) {
|
|
27
27
|
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
const orcThreeNames = capitalizeFirstLetter(orcMe()) +
|
|
31
|
-
const orcTwoNames = capitalizeFirstLetter(orcMe()) +
|
|
30
|
+
const orcThreeNames = capitalizeFirstLetter(orcMe()) + ' ' + capitalizeFirstLetter(orcMe()) + ' ' + capitalizeFirstLetter(orcMe());
|
|
31
|
+
const orcTwoNames = capitalizeFirstLetter(orcMe()) + ' ' + capitalizeFirstLetter(orcMe());
|
|
32
32
|
|
|
33
|
-
console.log(
|
|
34
|
-
console.log(orcThreeNames +
|
|
33
|
+
console.log('Orc battle started!');
|
|
34
|
+
console.log(orcThreeNames + ' ⚔️ ' + orcTwoNames);
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
# Result of the example above
|
package/index.js
CHANGED
package/package.json
CHANGED
package/test/index.test.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
const orcMe = require(
|
|
1
|
+
const orcMe = require('../index.js');
|
|
2
2
|
|
|
3
|
-
test(
|
|
3
|
+
test('Check if it returns a random Orc name with a length between 2 and 5 chars', () => {
|
|
4
4
|
const expectedString = expect.stringMatching(/^[a-z]{2,5}$/);
|
|
5
5
|
|
|
6
6
|
expect(orcMe()).toEqual(expectedString);
|
|
7
|
+
expect(orcMe()).not.toBe('');
|
|
7
8
|
});
|