pandastrike / fairmont

Functional (and) reactive programming library for JavaScript.
ISC License
49 stars 8 forks source link

`clone` fails with "ReferenceError: $ is not defined" #26

Closed PandaWhisperer closed 9 years ago

PandaWhisperer commented 9 years ago

Example:

{clone} = require "fairmont"
clone foo: "bar"

Result

fairmont/lib/object.js:67
        clone[key] = $.clone(object[key]);
                     ^
ReferenceError: $ is not defined
  at clone (fairmont/lib/object.js:67:22)
  at repl:1:5

It appears that the clone method is referencing $.clone, which does not exist.

Also there are no tests for clone.

PandaWhisperer commented 9 years ago

I tried looking into this, but the link referenced in the the description of the clone method does not load for me.

http://coffeescriptcookbook.com/chapters/classes_and_objects/cloning

dyoder commented 9 years ago

I'm not sure what code you're using. This is the current code:

https://github.com/pandastrike/fairmont/blob/master/src/object.litcoffee#clone

There's no reference to $.

dyoder commented 9 years ago

The CoffeeScript cookbook appears to be down…

PandaWhisperer commented 9 years ago

I followed that link, and it still references $.clone.