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 🙏

© 2026 – Pkg Stats / Ryan Hefner

scriptelper

v1.0.0

Published

A beginner-friendly JavaScript library for DOM manipulation.

Downloads

166

Readme

Scriptelper Banner

Scriptelper

A lightweight, beginner-friendly JavaScript library for DOM manipulation, Local Storage, and Fetch requests.

Scriptelper

A lightweight, beginner-friendly JavaScript library for DOM manipulation, Local Storage, and Fetch requests.

Scriptelper simplifies common JavaScript tasks with a clean, chainable API and beginner-friendly error messages.


Why Scriptelper?

Working directly with the DOM can become repetitive:

document.querySelector("#title").textContent = "Hello World";

With Scriptelper:

$.find("#title").text("Hello World");

Scriptelper focuses on:

  • Simplicity
  • Readability
  • Chainable APIs
  • Helpful error messages
  • Lightweight design
  • Beginner-friendly learning

Features

  • DOM Selection
  • Text Manipulation
  • HTML Manipulation
  • Event Handling
  • CSS Class Helpers
  • Show / Hide Elements
  • Element Creation
  • Attribute Helpers
  • Form Value Helpers
  • Local Storage Helpers
  • Fetch API Helpers
  • Chainable Methods

Installation

NPM

npm install scriptelper

CDN

<script src="https://unpkg.com/scriptelper"></script>

Global Instance

window.$ = new Scriptelper();

DOM Selection

find()

Returns the first matching element.

Syntax

$.find(selector);

Examples

$.find("#title");
$.find(".card");
$.find("button");

findAll()

Returns all matching elements.

Syntax

$.findAll(selector);

Example

const cards = $.findAll(".card");

cards.forEach(card => {
    card.addClass("active");
});

Element Methods

All methods below are available on elements returned by find(), findAll(), and create().


text()

Sets text content.

$.find("#title").text("Welcome");

html()

Sets HTML content.

$.find("#box").html("<b>Hello World</b>");

addClass()

Adds a CSS class.

$.find("#box").addClass("active");

removeClass()

Removes a CSS class.

$.find("#box").removeClass("active");

toggleClass()

Adds a class if it doesn't exist and removes it if it does.

$.find("#box").toggleClass("active");

replaceClass()

Replaces one class with another.

$.find("#box").replaceClass("inactive", "active");

toggle()

Shows or hides an element.

$.find("#menu").toggle();

value()

Set a value:

$.find("#name").value("Samad");

Get a value:

const name = $.find("#name").value();

attr()

Set an attribute:

$.find("#box").attr("data-id", "123");

Get an attribute:

const id = $.find("#box").attr("data-id");

on()

Adds an event listener.

$.find("#btn").on("click", () => {
    console.log("Button clicked");
});

off()

Remove all handlers:

$.find("#btn").off("click");

Remove a specific handler:

function handleClick() {
    console.log("Clicked");
}

$.find("#btn").off("click", handleClick);

appendTo()

Appends an element to a parent.

const div = $.create("div");

div.appendTo("#container");

remove()

Removes the selected element from the DOM.

$.find("#oldBox").remove();

Creating Elements

create()

Creates a new HTML element.

const div = $.create("div");

Create and append directly:

$.create("p", "#container");

Example:

$.create("p")
    .text("Hello Scriptelper")
    .appendTo("#container");

Local Storage

store()

Stores data in Local Storage.

$.store("user", {
    name: "Samad",
    age: 20
});

load()

Retrieves data from Local Storage.

const user = $.load("user");

removeItem()

Removes stored data.

$.removeItem("user");

clear()

Clears all Local Storage data.

$.clear();

Fetch Helpers

getData()

Fetches data from an API.

const users = await $.getData(
    "https://jsonplaceholder.typicode.com/users"
);

postData()

Sends data using a POST request.

await $.postData(
    "https://jsonplaceholder.typicode.com/users",
    {
        name: "Samad"
    }
);

Method Chaining

$.find("#title")
    .text("Welcome")
    .addClass("active")
    .attr("data-loaded", "true");

Example Project

HTML

<h1 id="title">Hello</h1>

<button id="btn">
    Change Text
</button>

JavaScript

$.find("#btn").on("click", () => {
    $.find("#title")
        .text("Welcome to Scriptelper!")
        .addClass("active");
});

Error Handling

Example messages:

Element not found.
Please check that the selector exists in your HTML.
Please provide a valid class name.
Please provide a URL.
Example: $.getData("https://api.example.com")

Roadmap

  • css()
  • show()
  • hide()
  • append()
  • prepend()
  • before()
  • after()
  • parent()
  • children()
  • animation helpers
  • utility functions

Version

v1.0.0

Contributing

Contributions, bug reports, feature requests, and pull requests are welcome.


License

MIT License


About

Scriptelper is an open-source project focused on making JavaScript easier for beginners.

Built and maintained by Scriptelper Labs.

Making JavaScript easier, one line at a time.