Useful JavaScript base classes for efficient and quick solutions to common problems.

Overview

JavaScript Base Classes

You can find the full documentation on the website.

Description

Useful JavaScript base classes for efficient and quick solutions to common problems.

Installation

npm install base-classes

Store

The Store is a base class that provides the necessary methods and attributes to organize state management efficiently and easily.

Import

import {Store} from 'base-classes'
const {Store} = require('base-classes')

Basic Usage

import {Store} from 'base-classes'

class MyClass extends Store {
    state = { count: 1 }
}

const myClass = new MyClass()

myClass.subscribe((state, prevState) => {
    console.log('state changed:', state)
})
myClass.updateState((state) => {
    return {...state, count: 2}
})

API



Contributing

Read our contributing guide to learn about our development process.

Code of Conduct

This project has adopted the Contributor Covenant as its Code of Conduct, and we expect project participants to adhere to it. Please read the full text so that you can understand what actions will and will not be tolerated.

Authors

License

MIT License

You might also like...

This is a website for solving IT issues and providing IT solutions as answers to submitted tickets from clients. It is a project from Software Interns Team in Safecotech Internship Program 2022.

This is a website for solving IT issues and providing IT solutions as answers to submitted tickets from clients. It is a project from Software Interns Team in Safecotech Internship Program 2022.

CONNECT IT-Solutions Table of Contents Built With Getting Started Description Documentation Commit History Screenshots Contributors Built With : Node

Sep 24, 2022

Automatically sync your leetcode solutions to your github account - top 5 trending GitHub repository

Automatically sync your leetcode solutions to your github account - top 5 trending GitHub repository

LeetHub - Automatically sync your code to GitHub. Top 5 Trending JavaScript Repositories Available on: What is LeetHub? A chrome extension that automa

Dec 31, 2022

My solutions for CS61A Fall 2020.

CS61A-Fall-2020 My solutions and experience for CS61A Fall 2020. 一、课程介绍 这门课作为Berkeley大一新生的第一门计算机课程,是一门计算机导论的课程,主要的编程语言是python,此外还介绍了LISP的方言Scheme语法和SQ

Dec 23, 2022

Harvard CS50x — 2022 solutions 😎

Harvard CS50x — 2022 solutions 😎

CS50x What is CS50x? 哈佛的计算机入门课,文档以及作业质量非常高,故将此课作为我计算机自学旅途的第一站。 Harvard's introductory computer courses, documents and assignments are of high quality,

Jan 3, 2023

CTF (Capture The Flag) is a type of information security competition that challenges contestants to find solutions or complete various tasks.

CTF (Capture The Flag) is a type of information security competition that challenges contestants to find solutions or complete various tasks.

WHAT IS CTF? CTF (Capture The Flag) is a type of information security competition that challenges contestants to find solutions or complete various ta

Dec 12, 2022

Chrome extension to save and keep track of problems from different platforms(codeforces, codechef, atcoder, leetcode etc.)

Chrome extension to save and keep track of problems from different platforms(codeforces, codechef, atcoder, leetcode etc.)

Keep Problems A Browser extension which helps to save and keep track of problems from different platforms(codeforces, codechef, atcoder, leetcode etc.

Aug 13, 2022

Crowdsource and crowdfund collaboration on maps of problems.

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

Dec 9, 2022

A string of four operations of the library, can solve the js digital calculation accuracy of scientific notation and formatting problems, support for thousands of decimal point formatting output operations

A string of four operations of the library, can solve the js digital calculation accuracy of scientific notation and formatting problems, support for thousands of decimal point formatting output operations

Apr 6, 2022
Comments
  • 1.0.0 Store Base Class

    1.0.0 Store Base Class

    Description

    Base class for state management.

    Checklist

    • [x] Jest Test
    • [x] README docs
    • [x] Manual test using README docs

    Additional

    import Store from 'base-classes/Store'
    
    new feature p1 
    opened by Ruben-Arushanyan 2
  • 1.0.5 Store docs imporvements

    1.0.5 Store docs imporvements

    Link: https://github.com/Ruben-Arushanyan/base-classes#store

    Description

    • [x] constructor
    • [x] state
    • [x] .updateState docs
    • [x] .subscribe docs
    • [x] unsubscribe docs
    • [x] .subscribeSelector docs
    • [x] prevState

    Additional

    documentation p1 
    opened by Ruben-Arushanyan 0
  • README improvements

    README improvements

    Link: https://github.com/Ruben-Arushanyan/base-classes#description

    Description

    • [x] Create more long description
    • [x] Add package.json keywords
    • [x] Add package.json descrtiption
    • [x] Update github repo description

    Additional

    Description

    Useful JavaScript base classes for efficient and quick solutions to common problems.

    Keywords

    • inherited
    • superclass
    • parent class
    • object-oriented
    • constructor
    • reuse
    • encapsulation
    • class-based
    • oop
    documentation p1 
    opened by Ruben-Arushanyan 0
Releases(v1.0.7)
  • v1.0.7(Oct 3, 2022)

    What's Changed

    • 3 docs website setup by @Ruben-Arushanyan in https://github.com/Ruben-Arushanyan/base-classes/pull/13

    Full Changelog: https://github.com/Ruben-Arushanyan/base-classes/compare/v1.0.6...v1.0.7

    Source code(tar.gz)
    Source code(zip)
  • v1.0.6(Oct 3, 2022)

  • v1.0.4(Oct 3, 2022)

    What's Changed

    • repo improvements by @Ruben-Arushanyan in https://github.com/Ruben-Arushanyan/base-classes/pull/11

    Full Changelog: https://github.com/Ruben-Arushanyan/base-classes/compare/v1.0.2...v1.0.4

    Source code(tar.gz)
    Source code(zip)
  • v1.0.2(Sep 29, 2022)

  • v1.0.1(Sep 29, 2022)

  • v1.0.0(Sep 29, 2022)

    What's Changed

    • 1.0.0 by @Ruben-Arushanyan in https://github.com/Ruben-Arushanyan/base-classes/pull/8

    New Contributors

    • @Ruben-Arushanyan made their first contribution in https://github.com/Ruben-Arushanyan/base-classes/pull/8

    Full Changelog: https://github.com/Ruben-Arushanyan/base-classes/compare/v0.0.6...v1.0.0

    Source code(tar.gz)
    Source code(zip)
  • v0.0.6(Sep 23, 2022)

Data structures & algorithms implementations and coding problem solutions. Written in Typescript and tested with Jest. Coding problems are pulled from LeetCode and Daily Coding Problem.

technical-interview-prep Data structures & algorithms implementations and coding problem solutions. Written in Typescript and tested with Jest. Coding

Lesley Chang 7 Aug 5, 2022
🤖 Tailwind CSS assistant helps you to edit classes (includes JIT & ignores purge), toggle breakpoint classes on an element and view current breakpoint

Tailwind CSS Assistant See it in action on this example website ?? ✅ Small JavaScript package that helps you work with Tailwind CSS by... Showing you

Mark Mead 30 Dec 28, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
EggyJS is a Javascript micro Library for simple, lightweight toast popups focused on being dependency-less, lightweight, quick and efficient.

EggyJS EggyJS is a Javascript micro Library for simple, lightweight toast popups. The goal of this library was to create something that meets the foll

Sam 10 Jan 8, 2023
Deta Base UI - A place with more functionality for managing your Deta Base(s).

Deta Base UI - A place with more functionality for managing your Deta Base(s). ✨ Features: Total rows count Quick multi select (click and shift) Searc

Harman Sandhu 13 Dec 29, 2022
a stack-separated way to bringing together common AWS services useful in a fullstack application that uses AWS Amplify libraries

Fullstack CDK Helpers This project helps developers create common AWS services that are useful in creating fullstack applications. Backend services ar

Focus Otter 14 Nov 26, 2022
Create, visualize and deploy AI solutions.

Welcome to the Hal9 community repo! This repo contains all the community-contributed scripts that power hal9.ai. We intend to share profits with creat

hal9.ai 106 Dec 22, 2022
Here I will add daily one problem with solution basic to advance level and try to add multiple solutions of a single problem.

#100-code-days ?? I am adding daily 1 JavaScript solution here ?? and you can fork the repo for add your solution for any specific probelm ⌛️ Day 01:

Amir Sohel 4 Jan 22, 2022