New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

me-not

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

me-not

Concept library to save typing when requiring modules

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

me-not

Simple module to require modules without always using require.

It's a concept library that uses Proxy to avoid the annoyance to require modules.

You should probably use ES2015 modules by now, but sometimes it's nice to get things just when you need them.

Note: this module does not play nicely with Node REPL. It throws a bunch of errors because it tries to call inspect, valueOf and those sort of methods. But the module is there and it works.

Node.js 6.x and newer is needed for this to work.

Usage

Instead of

const fs = require("fs");
const path = require("path");
const _ = require("underscore");

fs.readFile(path.resolve(...));

you can do

const R = require("me-not"); // require-me-not... get it? ... Plz I know...
const _ = R.underscore;

R.fs.readFile(R.path.resolve(...));

That's it. It just saves some typing. It can be used to require files with a path:

const module = R["./lib/module"];

Using delete unloads a module from require's cache:

delete R.underscore;

License.

MIT. See LICENSE.

Keywords

FAQs

Package last updated on 30 May 2016

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