omnipresent

Access your common logic everywhere🧞‍♀️.

Usage no npm install needed!

<script type="module">
  import omnipresent from 'https://cdn.skypack.dev/omnipresent';
</script>

README

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