1.0.2 • Published 5 years ago

betterscript v1.0.2

Weekly downloads
3
License
ISC
Repository
github
Last release
5 years ago

betterScript

Better Script is a package for javascript that is meant to keep errors out of the workflow with feature like automatic typecasting and global definitions. There it is fine tuned for me, however it is well documented and will be easy to edit and work for yourself if you want. If you have spotted a bug, well idk how to work github. Just don't commit to master branch. Also if you fork this, please let me know. I would love to see your work and maybe it can influence future versions of this project!

Installation

Currently there is an npm repo avalible. To install just run:

npm i betterscript

Usage

Okay so this shouldn't be too complex. Say you have a file and want to run it as betterScript instantly in node js. This is how you would do so.

const fs = require('fs');
const bs = require('betterscript');

// read a file with betterscript code in it
let myFile = fs.readFileSync('server.js');
// make sure the file is not still a buffer
MyFile = myFile.toString();
// create an instance with the code from the file
let MyInstance = new bs(MyFile);
// get the string for the file just read
let MyCode = MyInstance.string;

// finally run the code
eval(MyCode);
1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago