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

nc-input-library

v1.7.5

Published

Easily Program Input Form, Buttons, and DataTable using JSON

Readme

Abstract

When building a CMS, one of the most common tasks is building UI for CRUD operations. NCInputLibrary aims to solve this by providing easy-to-use CRUD interface.

Live Demo

https://www.nusantara-cloud.com/opensource/nc-input-library

Details

NCInputLibrary allows building a CRUD interface using:

  • HTML inputs (textbox, textarea, select)
  • Buttons
  • DataTable (https://datatables.net)

The interface is configured through writing simple JSON header, such as:

  const studentEditorHeader = {
    design: {
      title: 'Student Editor',
      panelColor: 'green'
    },
    table: {
      ui: [
        {id: 'id', desc: 'ID', dataTable: true, input: 'text', disabled: true},
        {id: 'lastModified', desc: 'Last Modified', dataTable: true, type: 'date'},
        {id: 'firstName', desc: 'First Name', dataTable: true, input: 'text', disabled: false},
        {id: 'lastName', desc: 'Last Name', dataTable: true, input: 'text', disabled: false},
        {id: 'grade', desc: 'Grade', dataTable: true, input: 'select', disabled: false, selectData: getStudentGrades},
        {id: 'address', desc: 'Address', dataTable: true, input: 'text', disabled: false},
        {id: 'notes', desc: 'Notes', dataTable: true, input: 'textArea'}
      ],
      conf: {
        orderType: 'desc', // If not defined orderType, default is desc
        orderBy: 'lastModified',
        getURL: getDataURL,
        onRowClicked: onRowClicked
      }
    },
    buttons: {
      ui: [
        {id: 'add', desc: 'Add', postTo: addStudentURL},
        {id: 'edit', desc: 'Edit', postTo: editStudentURL},
        {id: 'delete', desc: 'Delete', confirm: 'Confirm delete?', postTo: deleteStudentURL}
      ]
    }
  }

Architecture

The library is written using Model-View-Presenter (MVP) architecture, where:

  • Model: consists only of data-related operations (e.g. talking to backend)
  • View: consist only of UI-related code (e.g. no application logic)
  • Presenter: glues model and view together by telling view what to do.

In the backend field, this architecture is analogous to MVC pattern. I'd like to think of MVP as MVC adapted for frontend development.

The core idea behind this architecture is to have the view only exposes view-related functionalities, such as: "start progress bar", "finish progress bar", "disable all buttons", "enable all buttons". The model, on the other hand, only expose data-related operations like "do a GET request", "do a POST request". The presenter is the one that connects the model and view together by telling them what to do.

To learn more about this architecture, read this awesome blog by Martin Fowler: https://martinfowler.com/eaaDev/uiArchs.html#Model-view-presentermvp

Code Structure:

  1. Entry point is main.js
  2. Transpilation (using browserify) is done through watch.js
  3. dist/bundle.js is the final result included by the browser

Commands

  1. npm start: start a watcher that compile the library if there's any change in the dependencies

Example

See documentation/basic.html