omnipresent
v1.0.5
Published
Access your common logic everywhere🧞‍♀️.
Downloads
8
Readme
Omnipresent🧞‍♀️
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