efunc

little library with fuctions

Usage no npm install needed!

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

README

Including eFunc

via Webpack

import 'efunc/eFunc'

via Node

const { Object, Math, $, $ } = require("efunc/eFunc")

via HTML

<script src="https://unpkg.com/efunc@v0.0.86/eFunc-cdn.min.js"></script>
<!--If you want latest version: (Your app might not work in the future)-->
<script src="https://unpkg.com/efunc@latest/eFunc-cdn.min.js"></script>

Docs

Returns random Integer:
Math.randomInt(max, min) // min = 0 by default.
Returns deeply copied object:
Object.clone(obj)
Returns string with replaced substrings. Doesn't work normally now:

arrOfSubstrs - array of substrings. Example: ['a', 'b'].

newSubStr - new substring, which will replace substrings.

'someString'.replaceAllArr([arrOfSubstrs], newSubStr)
Returns document.querySelector(selector)
$(selector)
Returns document.querySelectorAll(selector)
$(selector)