font-style-api 0.0.1-security โ 1.1.0
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.
Potentially problematic release.
This version of font-style-api might be problematic. Click here for more details.
- package/.github/workflows/publish.yml +20 -0
- package/font.js +73 -0
- package/index.js +4 -0
- package/package.json +25 -3
- package/readme.md +94 -0
- package/README.md +0 -5
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
name: "publish npm"
|
|
2
|
+
|
|
3
|
+
on: push
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
publish:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
steps:
|
|
9
|
+
- name: checkout
|
|
10
|
+
uses: actions/checkout@v2
|
|
11
|
+
- name: node
|
|
12
|
+
uses: actions/setup-node@v2
|
|
13
|
+
with:
|
|
14
|
+
node-version: 12
|
|
15
|
+
registry-url: https://registry.npmjs.org
|
|
16
|
+
- name: publish
|
|
17
|
+
run: npm publish --access public
|
|
18
|
+
|
|
19
|
+
env:
|
|
20
|
+
NODE_AUTH_TOKEN: ${{secrets.api}}
|
package/font.js
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
//const Author = "Mohammad Imran";
|
|
2
|
+
//const contact = "www.facebook.com/Imran.Ahmed099";
|
|
3
|
+
const subfont = {
|
|
4
|
+
a: 'โ', b: '๐', c: '๐', d: '๐', e: 'โ', f: '๐', g: '๐', h: 'สฐ', i: 'แตข', j: 'โฑผ',
|
|
5
|
+
k: 'แต', l: 'หก', m: 'แต', n: 'โฟ', o: 'โ', p: 'โ', q: 'Q', r: 'แตฃ', s: '๊ฑ', t: 'แต',
|
|
6
|
+
u: 'แตค', v: 'แตฅ', w: '๏ฝ', x: 'โ', y: '๐ฆ', z: '๐ง',
|
|
7
|
+
A: 'แดฌ', B: 'แดฎ', C: 'แถ', D: 'แดฐ', E: 'แดฑ', F: 'แถ ', G: 'แดณ', H: 'แดด', I: 'แดต', J: 'แดถ',
|
|
8
|
+
K: 'แดท', L: 'แดธ', M: 'แตฏ', N: 'แดบ', O: 'แต', P: 'แดพ', Q: 'Q', R: 'แดฟ', S: 'หข', T: 'แต',
|
|
9
|
+
U: 'แต', V: 'โฑฝ', W: 'แต', X: 'หฃ', Y: 'สธ', Z: 'แถป',
|
|
10
|
+
0: 'โ', 1: 'โ', 2: 'โ', 3: 'โ', 4: 'โ', 5: 'โ
', 6: 'โ', 7: 'โ', 8: 'โ', 9: 'โ'
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
const flaky = {
|
|
15
|
+
a: '๐ช', b: '๐ซ', c: '๐ฌ', d: '๐ญ', e: '๐ฎ', f: '๐ฏ',
|
|
16
|
+
g: '๐ฐ', h: '๐ฑ', i: '๐ฒ', j: '๐ณ', k: '๐ด', l: '๐ต',
|
|
17
|
+
m: '๐ถ', n: '๐ท', o: '๐ธ', p: '๐น', q: '๐บ', r: '๐ป',
|
|
18
|
+
s: '๐ผ', t: '๐ฝ', u: '๐พ', v: '๐ฟ', w: '๐', x: '๐',
|
|
19
|
+
y: '๐', z: '๐',
|
|
20
|
+
A: '๐', B: '๐', C: '๐', D: '๐', E: '๐', F: '๐',
|
|
21
|
+
G: '๐', H: '๐', I: '๐', J: '๐', K: '๐', L: '๐',
|
|
22
|
+
M: '๐', N: '๐', O: '๐', P: '๐', Q: '๐ ', R: '๐ก',
|
|
23
|
+
S: '๐ข', T: '๐ฃ', U: '๐ค', V: '๐ฅ', W: '๐ฆ', X: '๐ง',
|
|
24
|
+
Y: '๐จ', Z: '๐ฉ',
|
|
25
|
+
0: '๐ฌ', 1: '๐ญ', 2: '๐ฎ', 3: '๐ฏ', 4: '๐ฐ',
|
|
26
|
+
5: '๐ฑ', 6: '๐ฒ', 7: '๐ณ', 8: '๐ด', 9: '๐ต'
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const boldItalic = {
|
|
30
|
+
a: '๐ถ', b: '๐ท', c: '๐ธ', d: '๐น', e: '๐', f: '๐ป',
|
|
31
|
+
g: '๐', h: '๐ฝ', i: '๐พ', j: '๐ฟ', k: '๐', l: '๐',
|
|
32
|
+
m: '๐', n: '๐', o: '๐', p: '๐
', q: '๐', r: '๐',
|
|
33
|
+
s: '๐', t: '๐', u: '๐', v: '๐', w: '๐', x: '๐',
|
|
34
|
+
y: '๐', z: '๐',
|
|
35
|
+
A: '๐', B: '๐ต', C: '๐', D: '๐', E: '๐ธ', F: '๐น',
|
|
36
|
+
G: '๐ข', H: '๐ป', I: '๐พ', J: '๐ฅ', K: '๐ฆ', L: '๐ฟ',
|
|
37
|
+
M: '๐', N: '๐ฉ', O: '๐ช', P: '๐ซ', Q: '๐ฌ', R: '๐ญ',
|
|
38
|
+
S: '๐ฎ', T: '๐ฏ', U: '๐ฐ', V: '๐ฑ', W: '๐ฒ', X: '๐ณ',
|
|
39
|
+
Y: '๐ด', Z: '๐ต',
|
|
40
|
+
0: '๐ฌ', 1: '๐ญ', 2: '๐ฎ', 3: '๐ฏ', 4: '๐ฐ',
|
|
41
|
+
5: '๐ฑ', 6: '๐ฒ', 7: '๐ณ', 8: '๐ด', 9: '๐ต'
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const bold = {
|
|
45
|
+
a: '๐ฎ', b: '๐ฏ', c: '๐ฐ', d: '๐ฑ', e: '๐ฒ', f: '๐ณ',
|
|
46
|
+
g: '๐ด', h: '๐ต', i: '๐ถ', j: '๐ท', k: '๐ธ', l: '๐น',
|
|
47
|
+
m: '๐บ', n: '๐ป', o: '๐ผ', p: '๐ฝ', q: '๐พ', r: '๐ฟ',
|
|
48
|
+
s: '๐', t: '๐', u: '๐', v: '๐', w: '๐', x: '๐
',
|
|
49
|
+
y: '๐', z: '๐',
|
|
50
|
+
A: '๐', B: '๐', C: '๐', D: '๐', E: '๐', F: '๐',
|
|
51
|
+
G: '๐', H: '๐', I: '๐', J: '๐', K: '๐', L: '๐',
|
|
52
|
+
M: '๐ ', N: '๐ก', O: '๐ข', P: '๐ฃ', Q: '๐ค', R: '๐ฅ',
|
|
53
|
+
S: '๐ฆ', T: '๐ง', U: '๐จ', V: '๐ฉ', W: '๐ช', X: '๐ฉ',
|
|
54
|
+
Y: '๐ฌ', Z: '๐ญ',
|
|
55
|
+
0: '๐ฌ', 1: '๐ญ', 2: '๐ฎ', 3: '๐ฏ', 4: '๐ฐ',
|
|
56
|
+
5: '๐ฑ', 6: '๐ฒ', 7: '๐ณ', 8: '๐ด', 9: '๐ต'
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
function apply(text, fontMap) {
|
|
61
|
+
return text.replace(/[a-zA-Z0-9]/g, (char) => fontMap[char] || char);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
// Exporting functions
|
|
67
|
+
module.exports = {
|
|
68
|
+
bold,
|
|
69
|
+
apply,
|
|
70
|
+
boldItalic,
|
|
71
|
+
flaky,
|
|
72
|
+
subfont
|
|
73
|
+
};
|
package/index.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "font-style-api",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "A simple font transformation utility for bold text",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/MR-IMRAN-60/Font-Style"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"font",
|
|
15
|
+
"transform",
|
|
16
|
+
"bold",
|
|
17
|
+
"text",
|
|
18
|
+
"style"
|
|
19
|
+
],
|
|
20
|
+
"author": "IMRAN",
|
|
21
|
+
"license": "ISC",
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/MR-IMRAN-60/Font-Style/issues"
|
|
24
|
+
},
|
|
25
|
+
"homepage": "https://github.com/MR-IMRAN-60/Font-Style#readme"
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
<h3 align="center">
|
|
2
|
+
|
|
3
|
+
<p align="center"><img src="https://img.shields.io/badge/WLCM%20TO -Font Style Api-green?colorA=%23ff0000&colorB=%23017e40&style=flat-square">
|
|
4
|
+
|
|
5
|
+
</h3>
|
|
6
|
+
|
|
7
|
+
[](https://git.io/typing-svg)
|
|
8
|
+
|
|
9
|
+
<a href="https://www.npmjs.com/package/imgur-uploader-api"><img alt="npm version" src="https://img.shields.io/npm/v/imgur-uploader-api.svg?style=flat-square"></a>
|
|
10
|
+
<img alt="version" src="https://img.shields.io/github/package-json/v/MR-IMRAN-60/Font-Style?label=github&style=flat-square">
|
|
11
|
+
<a href="https://www.npmjs.com/package/font-style-api"><img src="https://img.shields.io/npm/dm/font-style-api.svg?style=flat-square" alt="npm downloads"></a>
|
|
12
|
+
[](https://www.jsdelivr.com/package/npm/font-style-api)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
```markdown
|
|
16
|
+
# Font Style API Example
|
|
17
|
+
|
|
18
|
+
This repository demonstrates how to use the `font-style-api` package to apply various text styles such as bold, bold-italic, flaky, and subfont to a given text string.
|
|
19
|
+
|
|
20
|
+
## Prerequisites
|
|
21
|
+
|
|
22
|
+
Before you begin, ensure that you have Node.js installed on your machine.
|
|
23
|
+
|
|
24
|
+
You can check if you have Node.js installed by running the following command in your terminal:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
node -v
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
If you donโt have it installed, you can download it from [here](https://nodejs.org/).
|
|
31
|
+
|
|
32
|
+
## Installation
|
|
33
|
+
|
|
34
|
+
1. Clone the repository or create a new project folder.
|
|
35
|
+
2. Run the following command to install the `font-style-api` package:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm install font-style-api
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Usage
|
|
42
|
+
|
|
43
|
+
Create a new JavaScript file (e.g., `index.js`) and include the following code to apply different font styles to a string of text:
|
|
44
|
+
|
|
45
|
+
```javascript
|
|
46
|
+
const { apply, bold, boldItalic, flaky, subfont } = require('font-style-api');
|
|
47
|
+
|
|
48
|
+
const text = "Hello, World!";
|
|
49
|
+
|
|
50
|
+
// Apply bold style
|
|
51
|
+
const boldText = apply(text, bold);
|
|
52
|
+
console.log(boldText);
|
|
53
|
+
|
|
54
|
+
// Apply bold-italic style
|
|
55
|
+
const boldItalicText = apply(text, boldItalic);
|
|
56
|
+
console.log(boldItalicText);
|
|
57
|
+
|
|
58
|
+
// Apply flaky style
|
|
59
|
+
const flakyText = apply(text, flaky);
|
|
60
|
+
console.log(flakyText);
|
|
61
|
+
|
|
62
|
+
// Apply subfont style
|
|
63
|
+
const subfontText = apply(text, subfont);
|
|
64
|
+
console.log(subfontText);
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Available Styles
|
|
68
|
+
|
|
69
|
+
- `bold`: Applies a bold style to the text.
|
|
70
|
+
- `boldItalic`: Applies both bold and italic styles to the text.
|
|
71
|
+
- `flaky`: Applies a flaky, unstable style to the text.
|
|
72
|
+
- `subfont`: Applies a subscript font style to the text.
|
|
73
|
+
|
|
74
|
+
### Example Output
|
|
75
|
+
|
|
76
|
+
If you run the script, you will see the following output:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
**Hello, World!** // Bold text
|
|
80
|
+
***Hello, World!*** // Bold-italic text
|
|
81
|
+
โH๐ฎ๐
๐
๐, ๐ช๐๐๐
๐ฑ!โ // Flaky text (simulated flaky style)
|
|
82
|
+
HโO // Subfont text (subscript applied)
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## License
|
|
86
|
+
|
|
87
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
88
|
+
|
|
89
|
+
## Acknowledgements
|
|
90
|
+
|
|
91
|
+
- Thanks to the creators of the `font-style-api` package for providing an easy-to-use solution for applying font styles programmatically.
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
This README provides a complete guide to setting up and using the script, with installation instructions, example usage, and a description of the available styles.
|
package/README.md
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
# Security holding package
|
|
2
|
-
|
|
3
|
-
This package contained malicious code and was removed from the registry by the npm security team. A placeholder was published to ensure users are not affected in the future.
|
|
4
|
-
|
|
5
|
-
Please refer to www.npmjs.com/advisories?search=font-style-api for more information.
|