npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

extools

v1.0.2

Published

Extra Javascript Tools for your website

Downloads

4

Readme

ExTools

Extra Javascript Tools for your website Quick & Easy


Tools included:


Installation

Simply include it as a <script> tag from CDN.

<script src="https://unpkg.com/[email protected]/extools.min.js"></script>

Or

# Use
npm install extools
# Or
yarn add extools
//Then
const extools = require("extools");

And don't forget css

<link rel="stylesheet" href="https://unpkg.com/[email protected]/extools.min.css">

Documentation & Example

TagInput

See example

First, create a blank Container for the tool

<div class="container1"></div>

Then, call the tool with the script

var t = new extools({ 
    container: ".container1", 
    tool: "taginput", 
    name: "taginput", 
    data: ["tag1", "tag", "tag3"],
    attributes: [{ el: ".input", name: "placeholder", value: "Enter a tag..." }]
});

|Attribute|Required|Uses| |---------|:------:|---| |container|yes|Defines container element for the tool| |tool|yes|Select the tool. Tools list here| |name|no|Name attribute for the hidden Input| |data|no|JSON array. The tags will shown on load| |attributes|no|JSON array. Set custom attribute for an element inside container|

Modal

See example

First, create a Container for the tool

<div class="container2">
    <button data-action="show">Show content</button>
    <div class="et--modal--hidden" data-target="hidden">
        You can put anything you want inside this `<div>`
    </div>
</div>

You can customize anything, except for the attribute data-action and data-target. Then, call the tool with the script

var t = new extools({ 
    container: ".container2", 
    tool: "modal",
    attributes: [{ el: "#select-element-inside-container", name: "custom-attribute-name", value: "attribute-value" }]
});

|Attribute|Required|Uses| |---------|:------:|---| |container|yes|Defines container element for the tool| |tool|yes|Select the tool. Tools list here| |attributes|no|JSON array. Set custom attribute for an element inside the container|

AutoComplete

See example

First, create a Container for the tool

<div class="container3"></div>

Then, call the tool with the script

var t = new extools({ 
    container: ".container3", 
    tool: "autocomplete",
    data: ["John", "Jenny", "Jack", "Harry"],
    name: "autocomplete",
    highlight: "#color-code",
    attributes: [{ el: ".input", name: "placeholder", value: "Type to search..." }]
});

|Attribute|Required|Uses| |---------|:------:|---| |container|yes|Defines container element for the tool| |tool|yes|Select the tool. Tools list here| |data|yes|JSON array. Contains all data to queried from| |name|no|Name attribute for the Input| |highlight|no|Color code for highlighting the text| |attributes|no|JSON array. Set custom attribute for an element inside the container|

Clone

See example

First, create a Container for the tool

<div class="container4">
    <div data-target="bucket" class="panel">
        <div class="panel-block" data-target="source">
            <span>Email:</span>
            <input type="email" class="input" name="emails[]" placeholder="[email protected]">
            <span class="button is-danger" data-action="remove"><span class="icon"><i class="far fa-trash-alt"></i></span></span>
        </div>
    </div>
    <button type="button" class="button is-dark" data-action="clone">Clone</button>
</div>

You can customize anything, except for the attribute data-action and data-target. Then, call the tool with the script

var t = new extools({ 
    container: ".container4", 
    tool: "clone",
    attributes: [{ el: "#select-element-inside-container", name: "custom-attribute-name", value: "attribute-value" }]
});

|Attribute|Required|Uses| |---------|:------:|---| |container|yes|Defines container element for the tool| |tool|yes|Select the tool. Tools list here| |attributes|no|JSON array. Set custom attribute for an element inside the container|

DatePicker

See example

First, create a Container for the tool

<div class="container5"></div>

Then, call the tool with the script

var t = new extools({ 
    container: ".container5", 
    tool: "datepicker",
    name: "datepicker",
    date: "2019-04-19",
    attributes: [{ el: "#select-element-inside-container", name: "custom-attribute-name", value: "attribute-value" }]
});

|Attribute|Required|Uses| |---------|:------:|---| |container|yes|Defines container element for the tool| |tool|yes|Select the tool. Tools list here| |name|no|Name attribute for the hidden Input| |date|no|yyyy-mm-dd. The date selected on start| |attributes|no|JSON array. Set custom attribute for an element inside the container|

Calculator

See example

First, create a Container for the tool

<div class="container6"></div>

Then, call the tool with the script

var t = new extools({ 
    container: ".container6", 
    tool: "calculator",
    name: "datepicker",
    attributes: [{ el: "#select-element-inside-container", name: "custom-attribute-name", value: "attribute-value" }]
});

|Attribute|Required|Uses| |---------|:------:|---| |container|yes|Defines container element for the tool| |tool|yes|Select the tool. Tools list here| |name|no|Name attribute for the hidden Input| |attributes|no|JSON array. Set custom attribute for an element inside the container|

Upload

See example

First, create a Container for the tool

<div class="container7"></div>

Then, call the tool with the script

var t = new extools({ 
    container: ".container7", 
    tool: "upload",
    name: "upload",
    multiple: true,
    directory: true,
    onChange: function(e) {
        //callback function for input
        console.log(e.target.files);
    },
    attributes: [{ el: "#select-element-inside-container", name: "custom-attribute-name", value: "attribute-value" }]
});

|Attribute|Required|Uses| |---------|:------:|---| |container|yes|Defines container element for the tool| |tool|yes|Select the tool. Tools list here| |name|no|Name attribute for the file Input| |multiple|no|Allow select multiple Files at once| |directory|no|Allow select Folder| |onChange|no|Callback function for the File input onchange| |attributes|no|JSON array. Set custom attribute for an element inside the container|