1.0.7 ā€¢ Published 10 years ago

emojiscript v1.0.7

Weekly downloads
25
License
-
Repository
github
Last release
10 years ago

EmojiScript

EmojiScript features emotion as a value. Use emotion literals with the most expressive language ever. It is implemented with sweet.js macros (using a fork of it since it doesn't natively support emoji...).

$ npm install emojiscript
$ emo file.js

The file example.js has example code.

EmojiScript is just a set of sweet.js macros, so you can use them individually if you want:

cat runtime/runtime.js && \
  ./sweet.js/bin/sjs \
      -m ./macros/poop.js \
      -m ./macros/algebra.js \
      -m ./macros/error.js \
      -m ./macros/terminating-cat.js \
      example.js

Since it compiles to JavaScript, you get all the features to JavaScript in addition to:

Emotional Algebra

šŸ˜„  + šŸ”„  == šŸ˜±;
šŸ˜„  + šŸ’„  == šŸ˜­;
šŸ˜„  + šŸ’§  == šŸ˜…;

for(var i=0; i<10; i++) {
  console.log(šŸ˜„  + i);
}

šŸ˜„
šŸ˜…
šŸ˜†
šŸ˜‡
šŸ˜ˆ
šŸ˜‰
šŸ˜Š
šŸ˜‹
šŸ˜Œ
šŸ˜

šŸ˜  > šŸ˜ž  == true;

Discourage Bad Operators

// Instead of
if(obj1 == obj2) { ... }

// Use this
if(obj1 šŸ’©  obj2) { ... }

Errors

// Instead of
throw new Error("something is wrong")

// Use this
šŸ˜”"something is wrong"

Automatic Cat Insertion

// Instead of
var foo = 1 + 2;
var bar = baz();
var user = šŸ˜„ + šŸ’„;

// Use this
var foo = 1 + 2šŸ˜ø
var bar = baz()šŸ˜ø
var user = šŸ˜„ + šŸ’„šŸ˜ø

Better Expressiveness

if(user < šŸ˜„ ) {
  šŸ˜” "be happy"šŸ˜ø
}
1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago