Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

readme.md 917B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # require-from-string [![Build Status](https://travis-ci.org/floatdrop/require-from-string.svg?branch=master)](https://travis-ci.org/floatdrop/require-from-string)
  2. Load module from string in Node.
  3. ## Install
  4. ```
  5. $ npm install --save require-from-string
  6. ```
  7. ## Usage
  8. ```js
  9. var requireFromString = require('require-from-string');
  10. requireFromString('module.exports = 1');
  11. //=> 1
  12. ```
  13. ## API
  14. ### requireFromString(code, [filename], [options])
  15. #### code
  16. *Required*
  17. Type: `string`
  18. Module code.
  19. #### filename
  20. Type: `string`
  21. Default: `''`
  22. Optional filename.
  23. #### options
  24. Type: `object`
  25. ##### appendPaths
  26. Type: `Array`
  27. List of `paths`, that will be appended to module `paths`. Useful, when you want
  28. to be able require modules from these paths.
  29. ##### prependPaths
  30. Type: `Array`
  31. Same as `appendPaths`, but paths will be prepended.
  32. ## License
  33. MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop)