0.0.1 • Published 4 years ago

unlibjs v0.0.1

Weekly downloads
1
License
Unlicense
Repository
github
Last release
4 years ago

JavaScript Style Guide

unlib.js

Although the library may be useful for solving real life problems, it has been created primarily for educational purposes.

The content of unlib.js originates from various JavaScript interview tasks, and therefore provides information on different algorithms and coding techniques. You are encouraged to contribute to the knowledge, including:

  1. Suggest new functionality via Issues
  2. Write new or work on existing implementations
  3. Add new tests; we use Jest
  4. Analyze and improve performance of library functions

Methods

online

For given lists of presence hours of several users, returns the intervals when all of them were online.

unlibjs.online(
  [[8, 12], [17, 22]],
  [[5, 11], [14, 18], [20, 23]]
) // -> [[8, 11], [17, 18], [20, 22]]

rle

Implements a Run-Length Encoding algorithm on A-Z strings.

unlibjs.rle('ABBCCC') // -> AB2C3
0.0.1

4 years ago