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

cyre

v1.1.1

Published

ID based reactive and dynamic networking for JavaScript applications

Downloads

5

Readme

CYRE


  Neural Line
  ID based event manager
  C.Y.R.E ~/`SAYER`/
  action-on-call

Cyre is designed to provide reactive and dynamic networking throughout the application. It's really interesting because the whole operation evolves around controlling the behavior how they communicate between each other.

If you are familiar with javascript pub/sub method or Redux's dispatchers/reducers you are good to go with Cyre. The main difference would be Cyre has one extra step, action(action, on, call) some methodology difference

#Action

Actions in cyre are the operators, the link between dispatchers and reducers of all services that application provide. The application could have unlimited number of emitters and subscribers however services can only be able to communicate through if their ID is listed in the actions list. Therefore limiting unauthorized access with reducers or vice-versa.

Actions in Cyre stack vertically, each action can have its own middleware, conditions and pre-payload. One action can have its own error log without affecting the next action's performance

cyre.action('reducer_id')

#On

On in cyre are the reducers/absorbers except that they don't listen to every dispatches/emits. Cyre targets specific reducer by their action type ID so they only act up on when they are called. One action can have multiple listeners and these listeners can be named or anonymous, => arrow, functions

cyre.on('uber', number => {
  return `calling taxi on ${number}`
})

#Call

Calls in Cyre are interesting methods because they are not particularly emitters more like triggers. I call them Air lift technology. Think of them like an embassy sends rescue drone to return its citizens in post apocalypse situation. Cyre doesn't concern about the emitter or the situation, only their ID. If the is valid against home database, actions list, it will dispatch the package to, trigger action, with that ID with optional new payload. Calls are runtime methods so thats why they need to be lightweight.

cyre.call('uber')

NPM Version NPM Version NPM Version

Installation

npm i cyre
yarn add cyre

Usage example


import {cyre} from 'cyre'

/*
  {
    cyre.action: 'predefine action with preconditions and default payload',
    cyre.on: 'link action.type with function' ,
    cyre.call: 'execute action by id'
    cyre.dispatch:'define and execute action on demand'
  }

*/
//eg simple use:

eg simple use

cyre.action({ id: 'uber', payload: 44085648634 })
cyre.on('uber', number => {
  console.log("calling taxi on ", number)
})
cyre.call('uber')



//user interface: at action creators/view model
//execute action with default payload
cyre.call('uber')

//execute action with new payload
cyre.call('uber', 220748567807)





Extra features

//Delay effect/debounce/or throttle action
cyre.action({
  id: 'screen_resize',
  type: 'adjustScreen',
  interval: 400
})
//Repeat action
cyre.action({
  id: 'apiCall',
  type: 'apiServer',
  interval: 400,
  repeat: 10
})
//Log for specific action
cyre.action({id: 'apiCall', type: 'apiServer', log: true})
//Stop all iterating actions
cyre.clr()
//Remove functions from listening
cyre.off(functionName)

Cyre examples

cyre-react-demo

holo-carousel ES6

Made with Cyre git projects

Cyre React example

holo-carousel

Project pipeline

  • 1.0.0 initial commit

    • adding functionality
    • expand useability
    • fix compatibility
  • 1.2.0 optimization

    • increase performance
    • testability
    • reliability

Meta

Distributed under the MIT license. See LICENSE for more information.

https://github.com/NeuralLine

Contributing

  1. Fork it (https://www.npmjs.com/package/cyre/fork)

Q0.0U0.0A0.0N0.0T0.0U0.0M0 - I0.0N0.0C0.0E0.0P0.0T0.0I0.0O0.0N0.0S0
Expands VERTICALLY as projects grows 2019