npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

reflective-coffeescript

v1.10.0-reflective.114

Published

Reflection-augmented CoffeeScript

Downloads

8

Readme

        {                    _||          |  _)
     }   }   {        _|-_)  _||  -_)  _|  _| |\ \ / -_)
    {   {  }  }     _|\___|_| _|\___|\__|\__|_| \_/\___|
     }   }{  {
    {  }{  }  }                    _____       __  __
   ( }{ }{  { )                   / ____|.... / _|/ _|
 .- { { }  { }} -.              .| |     ___ | |_| |_ ___  ___
(  ( } { } { } }  )            ( | |    / _ \|  _|  _/ _ \/ _ \
|`-.._________..-'|            |'| |___| (_) | | | ||  __/  __/
|                 |            |  \_____\___/|_| |_| \___|\___|
|                 ;--.      .--:                 :
|                (__  \    /  __)  _____         : _       _
|                 | )  )  (  ( |  / ____|        :(_)     | |
|                 |/  /    \  \| | (___   ___ _ __ _ _ __ | |_
|                 /  /      \  \  \___ \ / __| '__| | '_ \| __|
|                 _/          \_  ____) | (__| | :| | |_) | |_
|                 |            | |_____/ \___|_| :|_| .__/ \__|
 `-.._________..-'              `-.._________..-'   | |
                                                    |_|

This experimental fork adds reflective features to Coffeescript

Reflective CoffeeScript aims to be fully compatible with the upstream, vanilla CoffeeScript.

Features added to reflective-coffeescript:

  • Reflective function

The syntax @> introduces reflective functions:

square = (x) @> x * x

Reflective functions work similarly to standard CoffeeScript functions:

square(2) is 4

but have their own CoffeeScript source code as a property:

square.coffee is "(x) @> x * x"

Reflective functions can only access 'this' and arguments.

Attempting to access a global variable or a lexical variable defined in an outer scope will result in a compiler error.

 x = 1
 @> x   # Compiler error

As an automatic extra feature, the 'do @>' syntax can be used to fully isolate the lexical scope of a block of code.

x = 1                       x = 1
do -> x = 2                 do @> x = 2
console.log x # prints 2    console.log x # prints 1

x = 1                       x = 1
do @>                       do (x) @>
  x = x * 3                   x = x * 3
  #   ^-- compiler error      console.log x  # prints 3
                            console.log x    # prints 1

Additional ideas are included in ROADMAP.org

Licensing and Copyright status

The original CoffeeScript is:

Copyright (c) 2009-2013 Jeremy Ashkenas

The Reflection-related modifications are:

Copyright (c) 2013,2014 Michele Bini

Please consult LICENSE for licensing details and about the lack of explicit or implied warranty.

CoffeeScript's README content follows:

If you have the node package manager, npm, installed:

npm install -g coffee-script

Leave off the -g if you don't wish to install globally. If you don't wish to use npm:

git clone https://github.com/jashkenas/coffeescript.git
sudo coffeescript/bin/cake install

Getting Started

Execute a script:

coffee /path/to/script.coffee

Compile a script:

coffee -c /path/to/script.coffee

For documentation, usage, and examples, see: http://coffeescript.org/

To suggest a feature or report a bug: http://github.com/jashkenas/coffeescript/issues

If you'd like to chat, drop by #coffeescript on Freenode IRC.

The source repository: https://github.com/jashkenas/coffeescript.git

Changelog: http://coffeescript.org/#changelog

Our lovely and talented contributors are listed here: http://github.com/jashkenas/coffeescript/contributors