Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rekuire

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rekuire

'rekuire' is basically node's 'require' without the relative paths

  • 0.1.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Rekuire NPM version

'rekuire' is basically node's 'require' without the relative paths!

It saves you TONS of time refactoring your code, and making it easily reusable. plus, it makes you code more readable = better!

Installation

to install, type

npm install rekuire

or add it to your package.json as a dependency.


Whats new?

####0.1.3

  • you can now rekuire file according to the relative path of the file
  • added support for index.js files inside a folder - can be retrieved by the folder path

####0.1.2

  • added support for .coffee files and .json

How to use it?

instead of doing this:

var MyModule = require('../../../MyModule.js'); <-- yuck!

why not do this:

var rek = require('rekuire');
var myModule = rek('MyModule');



or that:

var myCoffee = rek('MyCoffee.coffee');
var myJson = rek('myJson.json');
var myModule = rek('src/api/MyModule');


if you want to resolve only the file location, for example, when you want to use proxyquire.
use:

var mypath = rek.path('MyModule');
// mypath = 'lib/classes/MyModule.js' 

for more examples, I recommand you to checkout the spec file :)


- - -

what does it do?

when 'rekuire' is first loaded to the project, it scans the source files locations, so when you need them they are right there to use! no relative paths are needed! yeahy!


- - -

issues

if you are having any problems, requests or critisizm, don't hesitate to open an issue, here


- - -

Development

To test, run: npm test

Keywords

FAQs

Package last updated on 06 Oct 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc