Navigation

    forum

    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    1. Home
    2. CulDeVu
    • Flag Profile
    • block_user
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Groups
    • Blog

    CulDeVu

    @CulDeVu

    1
    Posts
    771
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    CulDeVu Follow

    Posts made by CulDeVu

    • Creating my own global functions

      So, say I have a module called "test" that look like

      module.exports = function()
       {
           this.name = "awesome";
       }
      

      When I try to access store that module in a global from the command line, like

      Memory.myTest = require("test");
      Memory.myTest.name
      

      It tells me that Memory.myTest is undefined, even when the first line spits back out the right code. Is there a way to make this work?

      As an alternative, is there a different way to construct my own global functions that can be used from both the code and the command line?

      Thanks!

      posted in General Discussion
      CulDeVu