raffinade

0.0.18 • Public • Published

Raffinade

Effort to transform CoffeeScript to prefix language. In order to avoid nested constructions and achieving code elegance.

Example issue and approaches to resolve:

# Issue
# Nested construction, cumbersomity

value = (some_function argument)[key]
# Approach

### Get property ###
gp = (key, obj) -> obj[key]
# Result

value = gp key some_function argument
# CS produce code returns lalest expression, altought some time need not this
# return, therefore this code is redundant. Possible to append undefined in
# last line, but this require one line

some_function = ->
    some_code
    undefined

# Looks better idea use prefix function ala JS void operator

v = -> undefined # Kind of JS void

some_function = -> v some_code

Readme

Keywords

Package Sidebar

Install

npm i raffinade

Weekly Downloads

0

Version

0.0.18

License

BSD-2-Clause

Unpacked Size

20.6 kB

Total Files

10

Last publish

Collaborators

  • shurko