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

@diff3usion/conceptualism

v0.0.2

Published

DSL for describing and deducing the relations of concepts

Readme

npm

Conceptualism

A DSL for describing and deducing relationships between concept terms.

This project is based on the Chevrotain parser building toolkit, and meta-chevrotain which is a DSL for generating chevrotain parser

Introduction

Rail Diagram

This DSL can be used to describe a context of related concept terms, usually names of sets, categories, or tags.

Then, it can deduce whether a object in such context is valid, and if it's valid, its implied relations of all concepts in the context.

Example (Objects on a map)

  • Map Item
    • Anything on a map is a Map Item
  • Structural and Geographic
    • A Map Item is either
      • Structural, meaning it's a concept related to some structure: house, road, sign, etc., or
      • Geographic, meaning it's a geographical concept: island, lake, continent, etc.
  • Building
    • All Buildings are Structural
  • House
    • All Houses are Building
  • Transportation
    • All Transportation are Structural
  • Road
    • All Roads are Transportation
  • Lake, River, and Ocean
    • All Lakes, Rivers, and Ocean are Geographic
  • Water
    • All Lakes, Rivers, and Ocean are Water

The above relations can be described as the following code

Syntax

?@Mode
>- map_item {
    ~^ geographic, structural
}
>+ structural {
    >+ building {
        house
    }

    >+ transportation {
        road
    }
}
>+ geographic {
    >+ water {
        lake
        river
        ocean
    }
}

The syntax has a directed-graph-like structure, where the nodes are the concept terms, and their position in the structure denotes their relation.

The direction of the graph edge is determined by the ">" and "<" order prefixes. For example,

>+ building {
    house
}

defines an edge from Building to House. If the ">" symbol is replaced with "<", the edge direction would be reversed.

Declaration and Qualification

The nodes that has a outgoing edge are called Declarations, which means they declare certain relations for the nodes they points to.

The nodes that has no outgoing edge are called Qualifications, which means they defines some conditions, such that once a object qualifies those conditions, the object are thus subject to the bounds of all declarations declared upon the qualification.

The two key relations between concepts terms are "is" and "isnt", which are denoted with the "+" and "-" verb prefixes in declarations.

Back to the previous example, in

>+ building {
    house
}

there is one declaration and one qualification.

The declaration ">+ building" declares whatever it points to must be "is building".

The qualification "+ house" qualifies whatever object that satisfies "is house".

Therefore, this example as a whole means "All houses are building"

Qualification with list of terms

Unlike declarations which can only have one term, qualifications can have a list of term along with a list prefix denoting the how the list is interpreted.

There are three logical prefixes, "&" for And, | for Or, and ^ for Oneof. For example, if one wants to say "anything that is both Building and Deserted are ToBeImproved", the following can work

>+ to_be_improved {
    &+ building, deserted
}

There is also another prefix for qualifications, the negation prefix "~", which reverse-selects what the qualification originally matches. For example,

>- map_item {
    ~^ geographic, structural
}

says "anything that is not one of geographic and structural is not a map item"

To be continued...

Just noticed the existance of RDF, RDFS, and OWL, which fulfills the intention of this project.

Development is suspended, and project is archived.