Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/minsithu/oxygen-script
a function extension of javascript
https://github.com/minsithu/oxygen-script
Last synced: 3 days ago
JSON representation
a function extension of javascript
- Host: GitHub
- URL: https://github.com/minsithu/oxygen-script
- Owner: MinSiThu
- License: mit
- Created: 2020-06-04T08:08:57.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T18:49:08.000Z (almost 2 years ago)
- Last Synced: 2024-04-24T07:24:45.005Z (7 months ago)
- Language: JavaScript
- Size: 938 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# oxygen-script
a function extension of javascript## Installation
```js
npm i oxygen-script
```In browser
```js```
It adds an extension of function style writing to javascript and provides a syntatic sugar for functional programming.
Then, this is example code
```js
let oxygen = require("oxygen-script");
console.log(oxygen.default.interpret(`
mul 3 4
`));
```By default , oxygen has only three functions.
- add - add two number values
- mul - add two string values
- concat - concat string,number values
These functions accepts only two arguments.You can extends your own function in oxygen script.
```js
// extend sub function in oxygen-script
oxygen.default.Libs.sub = function(a,b){
return a-b;
}
console.log(oxygen.default.interpret(`
sub 3 4
`));
```## RoadMap
SpaceBar in String are not still implemented yet.
Will implement soon.
```js
concat "Java Script" //=> produces an error
```