@zellwk/javascript
v4.0.1
Published
Collection of useful JavaScript code — for both browsers and node.
Downloads
21
Readme
JavaScript
I put together a collection of JavaScript functions I use. I found them exceptionally useful and I hope you will too.
Note: This collection is ESM only and cannot be used with CommonJS.
Installation and usage with npm
You can install the library with npm:
npm install @zellwk/javascript
All files are found within there folders:
browser
— usable only in browsersnode
— usable only in Nodeutils
— usable in both browsers and node
Just import whatever file you need from these folders. When importing, you can skip the src
path because that is already handled for you in the package.json
file.
Example for using Local Store:
import * as localStore from '@zellwk/javascript/browser/local-store.js'
Installation and usage without npm
You can use these libraries in the frontend even if you don't use a bundler. All you need to do is retrieve the library from a CDN like JsDelivr.
When you use this method, you need to include the src
folder in your path.
Here's an example:
import localStore from 'https://cdn.jsdelivr.net/npm/@zellwk/[email protected]/src/browser/localstore.js'
See this article to make this nicer for your project.
WIP Warning
This repository is always a Work in Progress. I may change anything anytime!
Changelog
Detailed changes for each release are documented in the release notes.