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

literal-require

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

literal-require

A literal templating for Node require

  • 1.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Nodejs literal templating for node native require module.

Usage

npm i literal-require --save
require('literal-require')

Add namespace to your application package.json

{
  ...

  -> "namespace": {
    "@application": "${ process.cwd() }/application"
  }
}

Then use in your require's as follows

require('@application/config.json')

require('@application/example-module')

require('path').literal('@application')

Will resolve the path with pre-evaluated literal key/value.

require('literal-require).add(namespace, path)

Adds namespace to be used later with require or path.literal

FAQs

Package last updated on 10 Jan 2019

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