Search code examples
javascripthierarchylibrariesdirectory-structure

What is a "common JavaScript library", and how do put code into mine?


Is it just my /javascript directory? I'm only guessing. I've had trouble uncovering the answer with google, actually. Looking into the context of the code I'm trying to apply, though, this seems to be the case.


Solution

  • Common JavaScript library just means that you can use this generic snippet of code with the framework of your choice, e.g. jQuery , MooTools, Dojo,….

    But those frameworks probably offer this functionality already or it's very easy to replicate. See for example jQuery clone.

    Not the right answer: Do you mean the CommonJS specification? It describes a module format for JavaScript. For example Node.js uses CommonJS modules.