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 🙏

© 2025 – Pkg Stats / Ryan Hefner

brainstorm-center-core

v1.2.5

Published

Utilities to get mentions and references between notes

Downloads

9

Readme


Introduction

Brainstorm.center.core is the core library used in brainstorm.center, that provides utilities to write notes and automaticly create relations between them.

Example:

It acomplish this by exposing the Note and the Notebook class:

import Notebook from 'brainstorm.center.core/Notebook';
import Note from 'brainstorm.center.core/Note';

const note = new Note('Functional programming', 'In computer science, functional programming is a programming paradigm where programs are constructed by applying and composing functions.');
const note2 = new Note('Functions', 'In computer programming, a subroutine is a sequence of program instructions that performs a specific task, packaged as a unit.');
const notebook = new Notebook().update(note).update(note2);
// Get mentions
const mentions = notebook.getMentionsOf(note); // returns a Inmutable.Set<Mention>() { Mention { from: note, to: note2, key: 'functions' } }
const references = notebook.getReferencesOf(note2); // returns a Inmutable.Set<Mention>() { Mention { from: note2, to: note, key: 'functions' } }

Core library in TS and JS

The library is writen in TS and transpiled to JS and both files are exposed.

Singleton Pattern

It also provides a Notebook Singleton object and a Proxy Note object that automaticly keep track of all the changes of any instance, updating the Notebook.notes repo.

import { Notebook } from 'brainstorm.center.core/singleton/Notebook';
import { NoteProxy as Note } from 'brainstorm.center.core/singleton/Note';

const note = new Note('Title', 'content');
Notebook.dictionary.size === 1; // true
Notebook.notes.size === 1; // true
// do it twice and it must keep the same values because the note has the same title.
// this next line will not return a new note because there is already a Note with the same title, it will return the curent note from Notebook.notes and the note.content updated.
const noteCopy = new Note('Title', 'content'); 
Notebook.dictionary.size === 1; // true
Notebook.notes.size === 1; // true
note === noteCopy; // true