# require-or-die **Repository Path**: mirrors_floatdrop/require-or-die ## Basic Information - **Project Name**: require-or-die - **Description**: Require common-js modules and js files that return values - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-24 - **Last Updated**: 2026-05-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # require-or-die [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][depstat-image]][depstat-url] Requires common.js modules as well as simple js files, that returns values. ## Usage ```js var rod = require('require-or-die'); rod('./sample.js', function (err, value) { console.log(value); }) ``` ### API #### require(path, [options], callback) ###### path Type: `String` Path to required file (will be resolved by `require.resolve`). ###### options Type: `Object` Options, that will be passed to fs.readFile. ###### callback Type: `Function` Function, that will be called, when contents is read and processed. Signature pretty common: `function (err, value)`. #### require.sync(path) Same as `require`, but in sync way. ## License MIT (c) 2014 Vsevolod Strukchinsky [npm-url]: https://npmjs.org/package/require-or-die [npm-image]: http://img.shields.io/npm/v/require-or-die.svg?style=flat [travis-url]: http://travis-ci.org/floatdrop/require-or-die [travis-image]: http://img.shields.io/travis/floatdrop/require-or-die.svg?branch=master&style=flat [depstat-url]: https://david-dm.org/floatdrop/require-or-die [depstat-image]: http://img.shields.io/david/floatdrop/require-or-die.svg?style=flat