GithubHelp home page GithubHelp logo

Comments (6)

rtfeldman avatar rtfeldman commented on July 20, 2024

Hm...seems to work fine in a Node REPL:

> var Immutable = require("seamless-immutable")
undefined
> var array = Immutable(["foo", "foo2", "bar", "bar2", "baz", "baz2"]);
undefined
> array
[ 'foo', 'foo2', 'bar', 'bar2', 'baz', 'baz2' ]

My first guess would be that Ember modifies Array.prototype in some way that is incompatible with seamless-immutable...do you know if that's something Ember does?

from seamless-immutable.

dagda1 avatar dagda1 commented on July 20, 2024

Yes, you are right, ember does modify the prototype. You can turn that off though.

Thanks

from seamless-immutable.

dagda1 avatar dagda1 commented on July 20, 2024

I've stopped ember extending the prototypes and I get a new error:

Uncaught ReferenceError: process is not defined

Which references this code:

    if (process.env.NODE_ENV === "development") {
      // Make all mutating methods throw exceptions.
      for (var index in bannedMethods) {
        banProperty(obj, bannedMethods[index]);
      }

Is this library node only?

Here is the updated jsbin

from seamless-immutable.

rtfeldman avatar rtfeldman commented on July 20, 2024

@dagda1 This is happening because you're importing the seamless-immutable source, not the compiled version (which has process stripped out). Try importing one of these instead:

seamless-immutable development mode (with freezing and helpful exception messages)
seamless-immutable production mode (minified, and runs faster, but doesn't freeze objects or offer helpful exception messages)

from seamless-immutable.

rtfeldman avatar rtfeldman commented on July 20, 2024

@dagda1 Did this fix the issue you were having?

from seamless-immutable.

dagda1 avatar dagda1 commented on July 20, 2024

Sorry, yes, thanks

from seamless-immutable.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.