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-data-inheritance

v0.0.1

Published

A Strapi plugin to inhert data from relative entities of the same content type.

Downloads

3

Readme

Data Inheritance plugin for Strapi

For inheriting data from related entities of the same content type.

Case

Screenshot 2023-06-22 at 10 24 22

When you want to have a "father and son" relationship between different items of the same content type. You can create a main father, which contains all of the information you need, and have a son, related to him, when leaving certain fields of the son empty, it will take the information from the same fields from father, as long as they aren't null there too. In that case, every time you'll updated information that is relevant to all of the children, they will all recieve it automatically, removing the need of manually changing everything, while also giving the ability to have certain fields having different information from that of the father. The plugin supports multiple parent and grandparents relationships, it remembers the id's it checked.

Currently supported field types are: Text, Rich Text, Number, Date, Boolean, Email, Password, Enumeration, Media, JSON and UID. The way Component and Dynamic Zones work is currently too complex for me to intergrate.

Installation

Either

npm install strapi-data-inheritance

Or you can just add the folder under the plugins folder in your Strapi project: yourproject/plugins

Afterwards, go to yourproject/config/plugins.ts (if none exists, create one), it should look like this:

export default {
  // ...
  "data-inheritance": {
    enabled: true,
    resolve: "./src/plugins/data-inheritance",
  },
  // ...
};

The export might look a bit different if you're using JS instead of TypeScript or if you have more plugins, make sure to check Strapi's plugin documentation. If done correctly, you should see the plugin in your admin panel > general > plugins.

Usage

Usage is fairly simple. When creating a content type, add your wanted fields, then add a relation field. All content types and fields should have unique names. Make sure the relation is to the same content type and is only one way relation, to avoid infinite loops. When making a GET request, it should get only the fields that you requested and seamlessly, like using Strapi normally. Currently, there is no way to choose which content types or specific fields will use the plugin, once it's activated, it covers every GET request.

For further customization, the magic happens in these files: ./server/middlewares/dataInherit.ts ./server/register.ts The rest are Strapi's plugin template files.

The first file is the actual plugin logic, the second is a life cycle method to register that middleware to the main app. The rest of the files are simply part of Strapi's plugin template.

Everything was tested on Strapi 4.10.1

Some credits

Big thanks to Nisim Joseph who was my mentor for this project, and the great people at Taboola who were always happy to help.