Giter Site home page Giter Site logo

01-node-ecosystem's Introduction

CF 01: Node Ecosystem

Submission Instructions

  • work in a fork of this repository
  • work in a branch on your fork
  • write all of your code in a directory named lab- + <your name> e.g. lab-susan
  • submit a pull request to this repository
  • submit a link to your pull request on canvas
  • submit a question, observation, and how long you spent on canvas

Resources

Requirements

Configuration

  • include the following:
    • README.md - contains documentation about your lab
    • .gitignore - contains a robust .gitignore file
    • .eslintrc - contains the provided .eslintrc file
    • .eslintignore - contains the provided .eslintignore file
    • lib/ - should contain your modules
    • test/ - should contain your unit tests

Feature Tasks

  • create a node.js module (greet.js) that exports a single function
    • the greet function should have a single parameter that should expect a string as it's input
    • the greet function should return the input name, concatenated with "hello "
    • the greet function should return null if the input is not a string
  • create a node.js module named arithmetic.js
    • this module should have add and sub methods
    • the add method should contain 2 parameters
      • these parameters should be numbers and the method should return the sum of the 2 numbers
    • the sub method should contain 2 parameters
      • these parameters should be numbers and the method should return the first number minus the second number
  • decide on the expected behavior for non-number inputs

Testing

  • write a test the expects the greet module to return "hello world!"
    • this should happen when invoked with "world!" as a parameter
  • write a test for the add and subtract methods on the arithmetic module
    • this should ensure that your functions work with number inputs

Documentation

  • write a description of your project (this should be in your README.md file)
BONUS 1pt
  • write a test that expects the greet module to return null when you use non string values
  • write a test that ensures the functions work as expected with non number inputs

Rubric

  • 2pts configuration
  • 3pts feature tasks
  • 3pts tests
  • 2pts documentation

01-node-ecosystem's People

Contributors

sjschmidt44 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.