Code Monkey home page Code Monkey logo

fragments_js's Introduction

Fragments of JavaScript code

This folder contains useful independent fragments of JS and TS code.
You can use this fragments in your applications to implement some pieces of functionality. Common fragments placed in _* folders.

Contents

Common fragments

Folder name Description
_types common types used in other fragments

Main fragments

Folder name Description
_types common types used in other fragments
fetch-url fetch data from url, display data or unsuccessful response status or error
fetch-url-method-data fetch data to/from url using method, return data or unsuccessful warning message
get-string-length-recursive returns length from string using recurcion approach
replace-words-in-sentence returns function
when the returned function takes 2 parameters, it does not return anything,
but stores the obtained values as an array with two values;
when the returned function takes 1 parameter, it returns the resulting string,
replacing all the words in it, according to the previously saved pairs
integer-division returns the result of integer division of one number by another
binary-search returns the number from given array using binary search algorithm
fibonacci returns finding the n-th fibonacci number from given n using recurcive algorithm
fibonacciMemo fibonacci memoized version
allPairsFromArrays returns all number pairs from given arrays using O(n^2) complexity algorithm
arraysIntersections returns common elements in the arr1 and arr2 using binary search
minMax returns { min, max } object from given numbers array
sum returns sum from given a and b arguments
numberSum returns sum from given arguments
square returns square from given number
identity returns same arg from given arg
stack (unfinished) Stack class realization
flatten creates a new array with all sub-array elements concatenated into it

fragments_js's People

Contributors

devandtravel avatar

Watchers

 avatar

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.