
Security News
Django Joins curl in Pushing Back on AI Slop Security Reports
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
DreamScript is an OpenSource superset of JavaScript that compiles to clean JavaScript output.
npm install -g dreamscript
npm install --save dreamscript
~$ dreamscript run <your file or directory file>
atau
~$ ds run <your file or directory file>
atau
~$ ds <your file or directory file>
for help:
~$ ds -h
Example
.
āāā code
āāā lib
āāā index.ds
āāā code.ds
$ dreamscript d code lib
this command will compile all files in the lib
folder and write the compilation results to the code
folder with the same name and the extension js
.
āāā code
ā āāā index.js
ā āāā code.js
āāā lib
āāā index.ds
āāā code.ds
const ds = require("dreamscript");
var code = `
func ds(){
write("hello, world");
}
ds();
`;
// compile code
ds.compile(code).then(compiled => {
console.log(compiled);
});
func ds(){
write("hello, earth");
}
ds();
var me = "jelek";
tulis("sekarang saya " + saya);
jika(saya tidak "ganteng"){
saya = "ganteng";
}
tulis("sekarang saya " + saya);
ulangi(var i sebanyak 20 kali){
tulis(i);
}
var i = 10;
selama(i > 0){
i--;
tulis(i);
}
untuk(var i = 0;i kurangDari 10;i++){
tulis(i);
}
var a = 1;
untuk(var i = 1;i kurangDari 10;i++){
a *= i;
tulis(i);
}
var manusia = {
nama: "dinda",
uang: "Rp" + a
}
tulis(manusia.nama + " mempunyai uang sebanyak " + manusia.uang);
write(3 + 2 - 12 + 32 * 21 / 2);
var name = inp("Whats Your Name: ");
write("hi" + name);
kelas Mamalia{
konstruksi(){
ini.bertulangBelakang = benar
ini.menyusui = benar
}
}
kelas Kucing turunan Mamalia{
konstruksi(){
// selalu panggil fungsi super() untuk mengunakan variabel induk
super();
tulis(ini.menyusui);
}
}
var neko = buat Kucing();
var baris = 5;
var k = 0;
var i = 1;
var j = 1;
selama(i <= baris){
var hasil = "";
untuk(j = 1; j <= baris dikurangi i; j++){
hasil += " ";
}
selama(k bukan 2 dikali i dikurangi 1){
hasil += "*";
k++;
}
tulis(hasil);
i++;
k = 0;
}
var a = inp("angka a: ");
var b = inp("angka b: ");
write(a + b) // "32"
var c = numb(inp("angka c: "));
var d = numb(inp("angka d: "));
write(c + d) // 5
tulis(2 + 2); // 4
tulis(Teks(2 + 2)); // "22"
DreamScript | JavaScript |
---|---|
func() | function() |
write() | console.log() |
type{} | class{} |
struct() | constructor() |
inp() | ~~~ |
FAQs
an open source Framework to create your app easy
We found that ds-beta demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.Ā It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.