0.1.66 • Published 2 years ago

ooi v0.1.66

Weekly downloads
41
License
MIT
Repository
github
Last release
2 years ago

Maintenance Maintaner Website shields.io made-with-Markdown made-for-VSCode GitHub license Profile views GitHub contributors GitHub issues

GitHub forks GitHub stars GitHub watchers GitHub followers

Logo

OOI

JavaScript Utility & Tools Library

🚀 Open Full Documentation

🔸 Home 🔸 Report Bug 🔸 Request Feature

⏹️ Table of Contents

⏹️ Features

  • Common JavaScript Utilities. ooi provides some useful functions and classes to make some specific operations more reusable. Working with objects, arrays, collections, convertation, events, formatting, meta-data and types.
  • Node.js Tools. Some useful methods to simplify certain node.js operations.
  • DOM Utilities & Tools. Get, create and modify DOM elements, working with DOM-events and so on.
  • Polyfills. Contains some useful polyfills.

⏹️ Installation

Installation as local package:

npm i --save ooi;

Using the Hole Library:

import ooi from 'ooi';

let arr = [1, 2, 3];

ooi.append(arr, 4, 5, 6);

[1, 2, 3, 4, 5, 6].forEach(num => {
  console.log(num);
});

console.log(arr);

⏹️ Import ooi-modules by .ooi text file

File util.ooi:

each
extend
flatten
class-meta
plural
isArray: $isarray
sse: ./util/sse.js

Install plugin esbuild-import-plugin:

npm i --save esbuild-import-plugin;

Plug it:

const importPlugin = require('esbuild-import-plugin');

esbuild
  .build({
    entryPoints: ['./src/index.js'],
    bundle: true,
    outfile: './dist/app/app.js',
    loader: {
      '.js': 'jsx'
    },
    sourcemap: true,
    target: ['chrome58', 'firefox57', 'safari11', 'edge16'],
    define: {
      'process.env.NODE_ENV': '"development"'
    },
    plugins: [
      // Here!
      importPlugin
    ]
  })
  .then(() => console.log('Builded!'))
  .catch(err => console.log(err));

Now you can import file util.ooi from esbuild module:

import util from './util.ooi';

util.each([1, 2, 3], (n, i) => console.log(n, i));

⏹️ Documentation

🎟️ Explore Full Utils List

Sections:

⏹️ CLI

Install ooi as CLI:

sudo npm install --global ooi;

Compile library for client:

ooi compile
  -s objects collections
  -t fn objects
  -min
  -o assets/js/lib/ooi.min.js;

Pack ooi as JS-module:

cli pack
  -s objects collections
  -t fn objects
  -o src/lib/ooi.js

⏹️ Testing

Test all utilities:

npm test;

DevPackages

  • esbuild-styla-plugin;
  • esbuild-xyaml-plugin;
  • ooi;
  • styla;
0.1.65

2 years ago

0.1.66

2 years ago

0.1.64

3 years ago

0.1.52

3 years ago

0.1.53

3 years ago

0.1.54

3 years ago

0.1.32

3 years ago

0.1.55

3 years ago

0.1.33

3 years ago

0.1.56

3 years ago

0.1.34

3 years ago

0.1.59

3 years ago

0.1.50

3 years ago

0.1.49

3 years ago

0.1.48

3 years ago

0.1.60

3 years ago

0.1.61

3 years ago

0.1.62

3 years ago

0.1.0

3 years ago

0.0.51

3 years ago

0.0.49

3 years ago

0.0.42

3 years ago

0.0.38

3 years ago

0.0.37

3 years ago

0.0.31

3 years ago

0.0.30

3 years ago

0.0.29

3 years ago

0.0.27

3 years ago

0.0.26

3 years ago

0.0.25

3 years ago

0.0.24

3 years ago

0.0.23

4 years ago

0.0.22

4 years ago

0.0.21

4 years ago

0.0.20

4 years ago

0.0.19

4 years ago

0.0.16

4 years ago

0.0.7

5 years ago

0.0.4

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago