Skip to content

Commit e69b51e

Browse files
✨ add the basic functionality
1 parent 5ed70b5 commit e69b51e

7 files changed

+10296
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dist
2+
node_modules

README.md

+19
Original file line numberDiff line numberDiff line change
@@ -1 +1,20 @@
11
# ByteWorder.js
2+
3+
Encode and Decode Bytes to Meaningful Word
4+
5+
## Encode
6+
7+
```js
8+
const encoded = encodeUint8ArrayToWord(
9+
new Uint8Array([2, 23, 43, 123, 2, 23, 42, 12, 34, 10, 98, 7])
10+
);
11+
console.log(encoded); // عاقبت مهر نر خدایی جهانبان تونیک تبرک
12+
```
13+
14+
## Decode
15+
16+
```js
17+
const encoded = "عاقبت مهر نر خدایی جهانبان تونیک تبرک";
18+
const decoded = decodeWordToUint8Array(encoded);
19+
console.log(decoded); // [2, 23, 43, 123, 2, 23, 42, 12, 34, 10, 98, 7]
20+
```

package-lock.json

+30
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "byteworder.js",
3+
"version": "0.0.4",
4+
"description": "",
5+
"main": "dist/index.js",
6+
"types": "dist/index.d.ts",
7+
"scripts": {
8+
"build": "tsc"
9+
},
10+
"repository": {
11+
"type": "git",
12+
"url": "git+https://github.com/PrivacyForge/byteWorder.js.git"
13+
},
14+
"author": "Mostafa Kheibary",
15+
"license": "ISC",
16+
"bugs": {
17+
"url": "https://github.com/PrivacyForge/byteWorder.js/issues"
18+
},
19+
"homepage": "https://github.com/PrivacyForge/byteWorder.js#readme",
20+
"devDependencies": {
21+
"typescript": "^5.5.4"
22+
},
23+
"files": [
24+
"dist",
25+
"README.md",
26+
"package.json"
27+
]
28+
}

0 commit comments

Comments
 (0)