Git Product home page Git Product logo

okiba's Introduction

Okiba Core

Tests Status Maintainability Test Coverage ๐Ÿ…

Sharp collection of tools for front-end development, created with performance in mind. ๐Ÿ—ก

Our primary concerns are: maximum FPS and minimum bundle size ๐Ÿš€

You can visualize it as a bag full of ninja tools for you to pick and use to tackle your front-end challenges.


Okiba is:

A set of tools you can use separately.

It is meant to level-up and ease-in your web-development routines.

It's designed so that you can drop-in as much or as less you want, by importing just what you actually use, up to a single function level, so that your final bundle will stay slim.

It is always evolving and open to contributons from OSS peers.

Okiba is not:

A library, framework or language.

It is not meant to replace the tools you already have, but rather offer battle-tested solutions to common routine tasks; sometimes it offers a cheaper alternative.

It does not impose choiches and integrates smoothly with frameworks you already use.


We strive to achieve affidability and affordability.

Our granularity is fine

We export single units that you can import separately. โœจ

This way tree-shake and uglification can work at their best.

Being dependency-free you always know what you're using and can look it up in our API, no surpises.

Our code is DRY and minimal

If something is common we abstract it away. ๐Ÿ’ก

We don't put something in until it is actually needed.

We strictly check for duplication and complexity, and take charge of some development pain in order to keep bundle size small.

Our seriousness level is high

Our quality checks are automated. ๐Ÿค–

Metrics matter, so our CI tools help us by enforcing 100% coverage and A maintainability.

No line makes it into master if the overall code quality gets degraded.

We could state that our API is 100% documented, but we still have no tests in place to back this metric up... so we don't ๐Ÿคก


Installation

You can grab all Okiba Core packages by using npx installer:

npx @okiba/core

Usage

Untranspiled code ๐Ÿ›‘

Okiba Core packages are not transpiled, so don't forget to transpile them with your favourite bundler. For example, using Babel with Webpack, you should prevent imports from okiba to be excluded from transpilation, like follows:

{
  test: /\.js$/,
  exclude: /node_modules\/(?!(@okiba)\/).*/,
  use: {
    loader: 'babel-loader',
    options: {
      presets: ['@babel/preset-env']
    }
  }
}

Full API List:

Array utils for okiba js


Utilities that operate on classes


Manages a DOM component, binds UI and recursively binds child components. Can be extended or instantiated


Utilities to work with dom elements and selectors


Emits drag events for all common pointers kinds (touch & mouse)


Collection of easings to alter a value


Emits events that can be listened and unlistened to. Allows for a catch-all event which is always triggered.


A component that has events. Extends Component and composes with EventEmitter, inerithing both's method sets.


A collection of contextless utility functions


Collection of math functions


Manages a dinamically grown pool of DOM Elements import PoolSystem from '@okiba/pool-system'


Manages loading of resources trough fetch to boost caching. Transparently relies on a WebWorker if possible to load on a separate thread.


Search utilities


A store module to implement state management. It allows registering to prop updates, as well as any update trough the catch-all callback.


Maps progress ovrer time, normalized between 0 and 1


Set of useful functions to ease WebWorkers development

okiba's People

Contributors

dependabot[bot] avatar fiadone avatar jacopopatroclo avatar lavolpecheprogramma avatar liqueflies avatar progress44 avatar vinzdef avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

okiba's Issues

[BUG?][pool-system] - `this.size` can be different from `this.pool.length`

const p = new PoolSystem()
const els = []

p.ensure(10)
console.log(p.size) // 10
console.log(p.pool.length) // 10
for (i = 0; i < 10; ++i) {
 els.push(p.get())
}

p.ensure(10)
console.log(p.size) // 10
console.log(p.pool.length) // 0     a)Expected 10???

for (i = 0; i < 10; ++i) {
 p.free(els.pop())
}

p.ensure(10)
console.log(p.size) //10
console.log(p.pool.size) // 20     b) Expected 10??

console.log(p.size) //10

A possible solution is to have free remove the element from dom when size >= pool.length -1 and avoid pushing that one back in the pool

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.