About 52 results
Open links in new tab
  1. What is "require" in JavaScript and NodeJS? - Stack Overflow

    One big difference between Node.js modules and browser JavaScript is how one script's code is accessed from another script's code. In browser JavaScript, scripts are added via the <script> …

  2. Require() function in JavaScript - Stack Overflow

    When I open console of Chrome 14 and type... require (or require(), if that matters) I get: ReferenceError. This means that JavaScript doesn't have that function by ...

  3. How do I use javascript require? - Stack Overflow

    Apr 18, 2017 · So I ask if anyone can explain how i enable require and Request in the code Im trying out. To be specific, I have a working php API on my server using Hawk HTTP authentication.

  4. What is Javascript 'require'? - Stack Overflow

    Feb 23, 2016 · I was analyzing javascript codes in a chrome extension and noticed this in it. require ("name of required class/file/module") //Not sure whether it is class,file,module May be its because …

  5. javascript - How does require () in node.js work? - Stack Overflow

    Feb 28, 2012 · Source code is here. exports / require are not keywords, but global variables. Your main script is wrapped before start in a function which has all the globals like require, process etc in its …

  6. The difference between "require (x)" and "import x"

    Oct 11, 2017 · 172 The major difference between require and import, is that import is native to JS, but require is only available in Node.js. For reference, below is an example of how Babel can convert …

  7. javascript - Node.js ES6 classes with require - Stack Overflow

    Node.js ES6 classes with require Asked 8 years, 11 months ago Modified 2 years, 11 months ago Viewed 195k times

  8. node.js - JavaScript: Diferenças entre import e require - Stack ...

    Jun 20, 2017 · JavaScript: Diferenças entre import e require Perguntada 8 anos, 7 meses atrás Modified 3 anos, 1 mes atrás Vista 64mil vezes

  9. javascript - ¿Cuál es la diferencia entre "import from" y "var require ...

    Apr 8, 2020 · 4 La diferencia entre import y require es abismal. Por una parte require es una función global introducida por el ambiente de ejecución mientras que import es una nueva sintaxis …

  10. Using Node.js require vs. ES6 import/export - Stack Overflow

    Jul 11, 2015 · Babel converts import and export declaration to CommonJS (require / module.exports) by default anyway. So even if you use ES6 module syntax, you will be using CommonJS under the …