1.0.9 β€’ Published 2 years ago

slangscript v1.0.9

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

welcome to slang script πŸ˜‹

auther : Damian Mostert email : swapswap365@gmail.com slang lang is an adaptable script allowing you to edit java scirpt with a word list, I will soon have many available, my mission is to make java script not just a fully writable language in english santax, but in every language there is :),

current built in languages

β€’ english, is also defualt β€’ mandrin β€’ russian β€’ hindi β€’ afrikans more comming soon :)

install

npm i slangscript

usage

//in your app.js
const fs = require('fs');
const slang = require("slangscript")
fs.readFile('api.slang', 'utf8', function(err, data){
  eval(slang.compileString({
  data:data,
  lang:"eng"
  /*avalable language options
      eng english
      mand mandrin
      afr afrikans
      ru russian
      hin hindi
  */
  }))
  //eval(slang({data:data,coffee:true})) // for coffiescript
});


//and in your api.slang
num is 0
if(num bigger than 2){
  console.log("num is bigger than 2")
}else if(num smaller than 2){
  console.log("num is smaller than 2")
}


/*afr example
V is 0
as(V grooter as 2){
  console.log("num is bigger than 2")
}anders as(V kliener as 2){
  console.log("num is smaller than 2")
}anders{
  console.log("num is 2")
}

*/

/* mandrin example
num 是 0
ε¦‚ζžœ(num 倧于 2){
  console.log("num is bigger than 2")
}ε¦εˆ™ε¦‚ζžœ(num 小于 2){
  console.log("num is smaller than 2")
}εˆ«ηš„{
  console.log("num is 2")
}

*/

// now just run node app.js
// you will now find that you can write javascript with english santax :)
// alot more language librarys comming soon
// i apologize if some of my santax is incorect with some languages, I only know eng, you can email me and ill fix it :)
// this is what slangscript can do :) crazy right?

how to use custom list

const slang = require("slangscript")
slang.compile({
customList:[
[" is ","="]
],
data:`
X is hey
`,
//result is " X = hey "
})

command line usage

once you installed slangscript npx slang should be avalable as a command, this is for executing js files with slang santax

npx slang yourfile.slang

with coffeescript :

npx slang yourfile.slang coffee

using alternative languages, defualt is english mandrin example :

npx slang yourfile.slang mandrin

with coffeescript :

npx slang yourfile.slang mandrin coffee

slangscript also does not interfere with your strings, so no need to worry about that πŸ˜‹, now its just fun code

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago