Skip to content

Latest commit

 

History

History
33 lines (19 loc) · 762 Bytes

README.md

File metadata and controls

33 lines (19 loc) · 762 Bytes

Omnipresent🧞‍♀️

npm version Build Status

The npm module that lets you access your common logic everywhere

Example:

Setup your global logic in any file.
'use strict';

const { addGlobally } = require( 'omnipresent' );


addGlobally({

    usefulFunction: x => (2 * x),

    utils: require( './utils' ),
});
Now in any file you can access your global logic by doing the following:
'use strict';

const { usefulFunction } = require( 'omnipresent' );


console.log( usefulFunction( 2 ) ); // logs 4