New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@erickmerchant/framework

Package Overview
Dependencies
Maintainers
1
Versions
244
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@erickmerchant/framework

A simple data down, actions up framework.

  • 17.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
increased by400%
Maintainers
1
Weekly downloads
 
Created
Source

@erickmerchant/framework

This scoped package is my personal framework. I use it on a number of small projects.

An Example

const framework = require('@erickmerchant/framework')
const { main, output, br, button } = require('@erickmerchant/framework/html')
const update = require('@erickmerchant/framework/update')(document.querySelector('main'))

framework({store, component, update})

function store (commit) {
  commit(() => 0)

  return (action) => {
    commit((state) => {
      switch (action) {
        case 'increment':
        return state + 1

        case 'decrement':
        return state - 1
      }
    })
  }
}

function component ({state, dispatch}) {
  return main(
    output(state),
    br(),
    button({ onclick () { dispatch('decrement') } }, '--'),
    button({ onclick () { dispatch('increment') } }, '++')
  )
}
  • @erickmerchant/router

    A module to do routing inside your components.

  • A TodoMVC example

    The source code can be found here

FAQs

Package last updated on 03 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc