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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@planet221b/pure-mvc

v2.2.5

Published

PureMVC is a lightweight framework for creating applications based upon the classic Model-View-Controller design meta-pattern

Downloads

7

Readme

pure MVC

how to install

npm i @planet221b/pure-mvc@latest

About

Basic Model-View-Controller architecture with extended functionality in TypeScript.

Example project here https://github.com/planet-221b/pureMVC-example.

Added functionalities.

  1. Mediator have sleap() and wake() functions, which will give you ability to stop and start mediator from listening notifications dynamically.
  2. Mediator have subscribeToNotifications() and unsubscribeToNotification functions, which are giving ability to dynamically subscribe and unsubscribe listening notifications. listenNotificationInterests now is a getter not a function.
  3. Now it's allowed to have same mediator-view pairs, so for every mediator instance will be generated unique id, which is available in mediator in id property.
  4. Now facade.retrieveMediator function has optional second property id. It's for cases where you have multiple instances of same mediator-view pairs. If you're using retrieveMediator function without giving id argument, it will return first mediator from mediators with given name.
  5. Now facade has new function getMediatorsCount(mediatorName: string) which will return count of Mediator with same name. It'd done for cases, when you want to write you own logic based on Mediator count.
  6. Mediator have index property which shows in which index in the same name mediators list it is, cane be used to different them from each other.
  7. Same notification can call multiple commands, so added functions to remove commands from notification's call queue. To remove single command from call queue call removeCommand(notification, command) on facade, and to remove all commands from notification's queue call removeCommands(notification) on facade.
  8. To register command for signle use registerCommandOnce(notification, command) on facade. So it will called only once, then it will be removed from commands queue.
  9. Added Guard for commad, it can be used to make checkes before command will execute, it has reference to facade too.
  10. Added addGuard(...guardClassRefs), you need to give as argument just Guard classes, not instances.
  11. Command has protected method perpare, which is provided to add guards.
  12. Command execution is being done in following sequence, prepare -> checkGuards -> execute

ToDo

2. Create a TypeScript example with all new functionalities usage. And update attached example.

Description

At the moment, attached example repo is in ES6 and doesn't using all new functionalities