GithubHelp home page GithubHelp logo

201flaviosilva / utilidades Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 3.22 MB

Just simple utils for javascript :)

Home Page: https://201flaviosilva.github.io/utilidades/

License: MIT License

JavaScript 99.88% HTML 0.12%
arrays javascript javascript-library jsdoc number random sorting-algorithms utility-library utils

utilidades's Introduction

Utilidades

Description

Just some simple JavaScript Utils.

Usage

Using NPM (Recommend)

Install Package

npm i utilidades

or

npm i https://github.com/201flaviosilva/utilidades#v1.4.1

Import to the project

import { randomNumber } from "utilidades";

console.log(randomNumber(1, 20));

Using CDN (jsdelivr)

<script src="https://cdn.jsdelivr.net/npm/[email protected]/build/utils.min.js"></script>
<script src="./your-js-file.js"></script>
// ./your-js-file.js
console.log(randomNumber(1, 20));

Available Commands

Command Description
npm install Install project dependencies
npm run clear Delete the "build" and "types" and "docs" folder
npm run jsDoc Build a docs page based in the jsdoc
npm run types Build the types
npm run compile Builds code bundle with production settings (minification, etc..)
npm run build Bundle the code, create the types and teh docs folder
npm run bump Update lib in the npm

Links

Examples

utilidades's People

Contributors

201flaviosilva avatar

Stargazers

 avatar

Watchers

 avatar  avatar

utilidades's Issues

Function to format strings

  • capitalize;
  • lowercase;
  • uppercase;
  • camelCase;
  • snakeCase;
  • kebabCase;
  • pascalCase;
  • sentenceCase;
  • inverse;
  • SCREAMING_SNAKE_CASE;

and create function to do the inverse of this functions : )

Path Finding

Create an mini lib for the A* (A Star)

Check other algorithms:

  • Hierarchical Pathfinding
  • Path Smoothing
  • Interruptible Pathfinding

Fibonacci number

Create simples function for the Fibonacci:

  • until -> run the Fibonacci sequence until the given number be lower or equal
  • sequence -> return the sequence from a start point end a end point sequence(2, 10) // [2, 3, 5, 8]

Decision Making

Check:

  • State Machine algorithm;
  • Behavior Trees algorithm;

Math Operations

Create function to do math operations with no limit arguments:

  • Sum;
  • Multiplication;
  • Subtraction;
  • Division;
  • Average;

Organize files

Organize functions by categories like:

  • src/
    • index.js
    • numbers.js
    • arrays.js
    • strings.js
    • etc...

Random String

{
numberCharacaters: 12,
numbers: true,
capital: true,
small: true,
symbols: true,
}
const ABC = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "y", "Z",];
const abc = ["a", "b", "c", "d", "e", "f", "G", "H", "I", "J", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",];
const numbers = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9",];
const symbols1 = ["!", "\"", "@", "#", "€", "$", "£", "'Reference to deleted milestone , '‰", "&", "¶", "/", "(", "[", ")", "]", "=", "≠", "'", "?", "+", "*",];

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.