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

strapi-plugin-field-clearer

v1.0.9

Published

A Strapi v5 plugin to clear/delete field data from content types. Supports nested fields, component arrays, relations, and more.

Readme

Strapi Plugin: Field Clearer

A Strapi v5 plugin that provides a convenient UI to clear/delete field data from content types. Perfect for managing test data, clearing relations, or resetting component arrays.

Features

  • Clear any field type: relations, components, media, text, enumerations, etc.
  • Support for nested fields inside components (e.g., coupons.freebies)
  • Target specific component indices (e.g., coupons[1].freebies to clear only the 2nd coupon's freebies)
  • Preview before delete - see exactly what will be removed
  • Bulk mode - clear multiple fields at once
  • Favorites - save frequently used field paths
  • Full audit logging
  • Secure - requires admin authentication and configurable content type whitelist

Installation

npm install strapi-plugin-field-clearer
# or
yarn add strapi-plugin-field-clearer

Configuration

Add the plugin configuration to your config/plugins.js (or config/plugins.ts):

module.exports = {
  'field-clearer': {
    enabled: true,
    config: {
      // Specify which content types can use the Field Clearer
      allowedContentTypes: [
        'api::cart.cart',
        'api::collection.collection',
        'api::product.product',
        // Add your content types here
      ],
    },
  },
};

Configuration Options

| Option | Type | Required | Description | |--------|------|----------|-------------| | allowedContentTypes | string[] | Yes | Array of content type UIDs that can use the Field Clearer. Format: api::collection-name.collection-name |

Usage

  1. Navigate to any configured content type in the Strapi admin panel
  2. Open a document (entry)
  3. Click the "Clear Field" button in the right panel
  4. Enter the field path you want to clear

Field Path Examples

| Path | Description | |------|-------------| | coupons | Clear all coupons (entire field) | | coupons.freebies | Clear freebies from ALL coupons | | coupons[0].freebies | Clear freebies from the 1st coupon only | | coupons[1].freebies | Clear freebies from the 2nd coupon only | | coupons[0,2].freebies | Clear freebies from 1st and 3rd coupons | | image | Clear a media field | | tags | Clear a relation field |

Modes

Single Mode

  • Enter a field path
  • Preview what will be deleted
  • Confirm deletion

Bulk Mode

  • Add multiple field paths
  • Preview all at once
  • Clear all selected fields in one operation

Favorites

  • Save frequently used field paths
  • Quick access from the favorites section
  • Validated before saving (ensures field exists)

Security

  • All endpoints require admin authentication
  • Content types must be explicitly whitelisted in configuration
  • Input validation on all field paths
  • Full audit logging of all clear operations

API Endpoints

The plugin exposes these endpoints (all require admin authentication):

| Method | Endpoint | Description | |--------|----------|-------------| | GET | /field-clearer/config | Get plugin configuration | | POST | /field-clearer/preview-field | Preview what will be deleted | | POST | /field-clearer/clear-field | Clear the specified field |

Requirements

  • Strapi v5.x
  • Node.js 18+

Development

# Build the plugin
npm run build

# Watch for changes during development
npm run watch

# Link for local development
npm run watch:link

License

MIT

Author

Akshay Golakiya