Skip to content

Commit 15d44e5

Browse files
committedDec 7, 2024
Initial commit
0 parents  commit 15d44e5

File tree

8 files changed

+267
-0
lines changed

8 files changed

+267
-0
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Node.js Package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-node@v4
13+
with:
14+
node-version: 20
15+
registry-url: "https://registry.npmjs.org"
16+
17+
- name: Install dependencies
18+
run: |
19+
yarn
20+
21+
- name: Build node packages
22+
run: |
23+
yarn build
24+
25+
- name: Publish node packages
26+
run: |
27+
npm publish --access public

‎.gitignore

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
lib-cov
2+
*.seed
3+
*.log
4+
*.csv
5+
*.dat
6+
*.out
7+
*.pid
8+
*.gz
9+
*.swp
10+
11+
pids
12+
logs
13+
results
14+
tmp
15+
16+
# Build
17+
public/css/main.css
18+
19+
# Coverage reports
20+
coverage
21+
22+
# API keys and secrets
23+
.env
24+
25+
# Dependency directory
26+
node_modules
27+
bower_components
28+
29+
# Editors
30+
.idea
31+
*.iml
32+
33+
# OS metadata
34+
.DS_Store
35+
Thumbs.db
36+
37+
# Ignore built ts files
38+
dist/**/*
39+
40+
# ignore yarn.lock
41+
yarn.lock
42+
.lh/

‎LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Xpo Development
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

‎README.md

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# DotScript
2+
3+
DotScript is a simple JavaScript library that makes your JavaScript code much simpler by making the whole code using 2 characters only, the dot `.` and the `` character.
4+
5+
## Installation
6+
7+
You can install DotScript by using the following command:
8+
9+
```bash
10+
npm install dotscript
11+
```
12+
13+
Or yarn:
14+
15+
```bash
16+
yarn add dotscript
17+
```
18+
19+
## Usage
20+
21+
You can use DotScript by importing the library in your JavaScript file:
22+
23+
```javascript
24+
import 'dotscript';
25+
26+
// Your code here
27+
```
28+
29+
## Example
30+
31+
Here is an example of how you can use DotScript:
32+
33+
```javascript
34+
import 'dotscript';
35+
36+
ᱹ.ᱹᱹ.ᱹᱹᱹ.ᱹᱹ.ᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹ.ᱹᱹ.ᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹ.ᱹᱹ.ᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹ.ᱹᱹ
37+
.ᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹ.ᱹᱹ.ᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹ.ᱹᱹ.ᱹᱹᱹᱹᱹ.ᱹᱹᱹᱹᱹ.ᱹᱹᱹᱹᱹ.ᱹᱹ.ᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹ.ᱹᱹ
38+
.ᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹ.ᱹᱹ.ᱹᱹᱹᱹᱹᱹᱹ.ᱹᱹᱹᱹᱹᱹ.ᱹᱹᱹᱹᱹᱹᱹᱹᱹ.ᱹᱹᱹᱹᱹᱹ.ᱹᱹᱹ.ᱹᱹᱹ.ᱹᱹᱹᱹᱹᱹᱹᱹ.ᱹᱹ.ᱹᱹᱹᱹᱹ
39+
.ᱹᱹ.ᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹ.ᱹᱹ.ᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹ.ᱹᱹ.ᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹ.ᱹᱹᱹᱹᱹ.ᱹᱹᱹ.ᱹᱹᱹᱹᱹᱹ.ᱹ.ᱹᱹᱹ
40+
.ᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹ.ᱹᱹ.ᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹ.ᱹᱹ.ᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹ.ᱹᱹ
41+
.ᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹ.ᱹᱹ.ᱹᱹᱹᱹ.ᱹᱹᱹᱹᱹᱹ.ᱹᱹ.ᱹᱹᱹᱹᱹᱹ.ᱹᱹᱹ.ᱹᱹᱹᱹᱹᱹ.ᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹ.ᱹ;
42+
```
43+
44+
This code is equivalent to the following code:
45+
46+
```javascript
47+
console.log('Hello, World!');
48+
```
49+
50+
As you can see, the code is much simpler and do not contain any characters that can confuse you.
51+
52+
## Documentation
53+
54+
The global object `` is the main object that you can use to access the DotScript API.
55+
It contains the following properties:
56+
57+
| Property | Description |
58+
| --- | --- |
59+
| `` | Execute the code and returns a new `` object |
60+
| `ᱹᱹ` | Lower-case letters from `a` to `z` |
61+
| `ᱹᱹᱹ` | Upper-case letters from `A` to `Z` |
62+
| `ᱹᱹᱹᱹ` | Numbers from `0` to `9` |
63+
| `ᱹᱹᱹᱹᱹ` | Special characters `*+,-./` |
64+
| `ᱹᱹᱹᱹᱹᱹ` | Special characters `!"#$%&'()` |
65+
| `ᱹᱹᱹᱹᱹᱹᱹ` | Special characters ``[]^_` `` |
66+
| `ᱹᱹᱹᱹᱹᱹᱹᱹ` | Special characters `:;<=>?@` |
67+
| `ᱹᱹᱹᱹᱹᱹᱹᱹᱹ` | Special characters `{\|}~` |
68+
69+
After accessing the desired group, enter `` n times as the property name to access the desired character where n is the index of the character in the group.
70+
71+
For example, to access the character `f`, you can use the following code:
72+
73+
```javascript
74+
ᱹ.ᱹᱹ.ᱹᱹᱹᱹᱹᱹ
75+
```
76+
This will add the character `f` to the code and will return the `` object so you can continue chaining the characters.
77+
78+
After you finish chaining the characters, simply add a `.ᱹ` at the end of the chain to execute the code.
79+
This will execute the code and return a new `` object so you can continue writing the code.
80+
81+
**Note:** After each execution, the code will reset so you can start a fresh new code.
82+
83+
## License
84+
85+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
86+
87+
## Contributing
88+
89+
You can contribute to this project by forking this repository and creating a pull request.

‎package.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "dotscript",
3+
"version": "1.0.0",
4+
"description": "Making javascript much simpler",
5+
"main": "dist/index.js",
6+
"repository": "https://github.com/xpodev/dotscript",
7+
"author": "Xpo Development <dev@xpo.dev>",
8+
"license": "MIT"
9+
}

‎src/dot.ts

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
const _ᱹ = (: ᱹᱹ, ᱹᱹ: number, ᱹᱹᱹ: number) => {
2+
return (_ᱹᱹ: unknown, ᱹᱹᱹᱹ: string | symbol) => {
3+
if (typeof ᱹᱹᱹᱹ === "string") {
4+
const p = ᱹᱹᱹᱹ.split("");
5+
if (p.some((p) => p !== "ᱹ")) {
6+
return undefined;
7+
}
8+
const char = ᱹᱹ + p.length - 1;
9+
if (char > ᱹᱹᱹ) {
10+
return undefined;
11+
}
12+
. = String.fromCharCode(char);
13+
return ;
14+
}
15+
};
16+
};
17+
18+
class ᱹᱹᱹ {
19+
constructor(: ᱹᱹ, ᱹᱹ: number, ᱹᱹᱹ: number) {
20+
return new Proxy<ᱹᱹᱹ>(this, {
21+
get: _ᱹ(, ᱹᱹ, ᱹᱹᱹ),
22+
});
23+
}
24+
25+
[key: string]: ᱹᱹ;
26+
}
27+
28+
let ᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹ: string;
29+
30+
class ᱹᱹ {
31+
constructor() {
32+
ᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹ = "";
33+
}
34+
35+
readonly ᱹᱹ = new ᱹᱹᱹ(this, 97, 122); // a-z
36+
readonly ᱹᱹᱹ = new ᱹᱹᱹ(this, 65, 90); // A-Z
37+
readonly ᱹᱹᱹᱹ = new ᱹᱹᱹ(this, 48, 57); // 0-9
38+
readonly ᱹᱹᱹᱹᱹ = new ᱹᱹᱹ(this, 42, 47); // *+,-./
39+
readonly ᱹᱹᱹᱹᱹᱹ = new ᱹᱹᱹ(this, 32, 41); // !"#$%&'()
40+
readonly ᱹᱹᱹᱹᱹᱹᱹ = new ᱹᱹᱹ(this, 91, 96); // []^_`
41+
readonly ᱹᱹᱹᱹᱹᱹᱹᱹ = new ᱹᱹᱹ(this, 58, 64); // :;<=>?@
42+
readonly ᱹᱹᱹᱹᱹᱹᱹᱹᱹ = new ᱹᱹᱹ(this, 123, 126); // {|}~
43+
44+
get (): ᱹᱹ {
45+
new Function(ᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹ)();
46+
return new ᱹᱹ();
47+
}
48+
49+
set (: string) {
50+
ᱹᱹᱹᱹᱹᱹᱹᱹᱹᱹ += ;
51+
}
52+
}
53+
54+
const = new ᱹᱹ();
55+
56+
export default ;

‎src/index.ts

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import from "./dot";
2+
3+
Object.assign(globalThis, {});
4+
5+
declare global {
6+
var : typeof import("./dot").default;
7+
}

‎tsconfig.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"compilerOptions": {
3+
"target": "es5",
4+
"lib": ["ES5"],
5+
"module": "commonjs",
6+
"esModuleInterop": true,
7+
"forceConsistentCasingInFileNames": true,
8+
"strict": true,
9+
"declaration": true,
10+
"resolveJsonModule": true,
11+
"skipLibCheck": true,
12+
"outDir": "./dist",
13+
"baseUrl": "."
14+
},
15+
"include": ["src/**/*.ts"]
16+
}

0 commit comments

Comments
 (0)
Please sign in to comment.