Giter Site home page Giter Site logo

hacktoberfest-js-utils's Introduction

Hacktoberfest 2018 JS Utils

Build Status

The point of this repository to build a suite of javascript methods by the time hacktoberfest ends! Let's get some T-shirts!
Original repo by @rgehan.

Installation

You first need to fork the repository, then clone it, go in the directory and run:

# Install the dependencies
yarn

How to participate

  1. Find an issue that is not assigned yet
  2. Implement it so that it passes all the tests (use yarn test src/[methodName].test.js to run the tests)
  3. Add a skeleton of a new method along with new test suite for it
  4. Now we have fixed a method, written the skeleton of a new one, and a test suite to accompany it, so we can push our changes and open a pull request.
  5. Create an issue for your new feature

Rules

  • Each PR should contain 3 files: implementation of the method you've been assigned to, a skeleton of a new one for someone else to work on and a test suite for it.
  • Make sure your implementation passes the previous tests before opening a Pull Request.
  • Do not use any npm functions or javascript built-in methods.

Project Structure

All methods will live in the src directory. They should be written as [methodName].js.

All tests will live in the test directory. A test file should be formatted [methodName].test.js to reflect what method is being tested.

A skeleton of new method

export default () => {
  // TO IMPLEMENT IN ANOTHER PR
};

Test suite example

import abs from '../src/abs';

describe('abs', () => {
  test('absolute of 0 to equal 0', () => {
    expect(abs(0)).toBe(0);
  });

  test('absolute of 1 to equal 1', () => {
    expect(abs(1)).toBe(1);
  });

  test('absolute of -1 to equal 1', () => {
    expect(abs(-1)).toBe(1);
  });
});

hacktoberfest-js-utils's People

Contributors

ifedyukin avatar aakashcodelab avatar markuspettersson98 avatar zoontek avatar adiman9 avatar maxhungry avatar bakoushin avatar ikhnaton avatar

Watchers

James Cloos 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.