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

@fzznk/form-tools

v0.0.9

Published

## 0. Building and Publishing

Readme

FormTools

0. Building and Publishing

  • ng build form-tools
  • from inside dist/form-tools run npm publish

1. FormBaseComponent

1.1. Purpose

Use this Component as a base for Components that use Reactive Forms to automate the update of form values on data changes and vice versa.

1.2. Installation

npm install @fzznk/form-tools

import {FormTools} from '@fzznk/form-tools'

1.3. Usage

Create your component that contains the reactive form in form: FormGroup, extending FormBaseComponent:

export class MyFormComponent extends FormBaseComponent

Don´t forget to call super() in your constructor.

Pass data to the Component as [dataObject] and make sure that all form controls are named identically as the object properties they should correspond to.

Include <button>-Tags with (click)="save()" and (click)="create()" and (click)="delete()" to trigger events and process them in the parent component as follows:

(createObj)="create($event)", (patchObj)="update($event)" and (deleteObj)="delete($event)"

You can also use (click)="saveOrCreate()" which decides bases on wheter a positive id of the object exists if the save- or the create-signal should be emitted.

Or, alternatively, implement your own save(), create() and delete() methods in your specific component, making sure to call super.save(), super.create() and super.delete() as the first statement in your methods to ensure the object is updated before being processed.

Lastly, by setting [debug]="true" all form and dataObject updates are logged to console.

2. SetFocusDirective

import FormsToolModule and add libSetFocus to element in order to focus it on load.

3. EnumToArrayPipe

use to loop over enum key/value pairs to create select options for input forms i.e. as <option *ngFor="let o of CO | enumToArray" [value]="o.index">{{o.name}}</option>

4. ShowBooleanValue

use to display boolean value as x or check

<lib-show-boolean-value [value]="value"></lib-show-boolean-value>