@muffin-dev/js-helpers

1.8.1 • Public • Published

Muffin Dev for Node - JS Helpers

This module contains a set of utilities for JavaScript.

Installation

In browser

Just download the js-helpers.min.js file, and import it in your we pages:

<script src="js-helpers.min.js"></script>

With Node JS

Install it locally with NPM by using the following command:

npm i @muffin-dev/js-helpers

Usage

In browser

Import the library in your web page with the <script> tag, and use the JSHelpers global variable to use the library:

<script src="js-helpers.min.js"></script>
<script>
    // Will log "00127" in your browser console
    console.log(JSHelpers.leading0(127, 5));
</script>

With Node JS

const JSHelpers = require('@muffin-dev/js-helpers');
// OR, if you need only a specific method
// const leading0 = require('@muffin-dev/js-helpers').leading0;

// Will log "00127" in your terminal
console.log(JSHelpers.leading0(127, 5));

Documentation

Tools

Helpers

Package Sidebar

Install

npm i @muffin-dev/js-helpers

Weekly Downloads

0

Version

1.8.1

License

MIT

Unpacked Size

98.5 kB

Total Files

29

Last publish

Collaborators

  • fat-muffin