0.0.2 • Published 2 years ago
cycjs v0.0.2
cycjs
what is cycjs ?
a javascript functional library.
why cyc ?
contributing your code.
Usage
npm i cycjs
1. commonjs
const cycjs = require('cycjs');
const { debounce } = require('cycjs');
const debounce = require('cycjs/lib/debounce');
2. esm
import cycjs from 'cycjs';
import { debounce } from 'cycjs';
import debounce from 'cycjs/lib/debounce';
3. broswer
<body>
<script src="./lib/index.js"></script>
<script>
window.onresize = cycjs.debounce(handle, 300);
</script>
</body>
<body>
<script src="./lib/debounce.js"></script>
<script>
window.onresize = debounce(handle, 300);
</script>
</body>