GithubHelp home page GithubHelp logo

knackassesment's Introduction

KNACK CODING EXERCISE

This is the implementation of the answer to the knack coding exercise by Yoel Martin Fornieles. See the 'coding_excercise_instructions.md' file for the requirements of the exercise.

Considerations

I consider an object a duplicate when it got the same keys and values than another one. This could be further discussed and approve within the team.

I consider that, for the duplicate objects, the _id field is the only one negligible (as the id field is the only one that cannot be a duplicate, being unique in the db).

I consider the object in the mock_application.json file as the model for the knack object. This could be defined in a model within the team, but right now is the only info I got.

Install

npm i

Dependencies

"chai": "^4.3.7", "mocha": "^10.2.0"

devDependencies

"eslint": "^8.37.0", "eslint-config-airbnb-base": "^15.0.0", "eslint-plugin-import": "^2.27.5"

Usage

npm start

-- the app will take as default values the following:

const filename = 'resources/mock_application.json';

const paramsToSanitize = [['objects', 'fields'], ['scenes', 'views']];

const outputFilename = 'sanitized_application.json';

This values can be modified from the index.js file.

The sanitized version of the mock_application.json file will be saved inside the 'output' directory. However, a sample can be found in the root of the project.

Run tests

npm test

The tests can be located in the './src/test' directory. Mocha have been used for the implementation of the tests.

ToDos

  • Work further in the error control (if the app would be an endpoint, add the error_codes, send more explicit error messages)
  • Decide when this app will be run (from a design perspective, is not the same to check for duplicates after the creation of the objects, with a cron on an scheduled maintenance, etc...)
  • Define what a duplicate is for our work team.

Author

๐Ÿ‘ค Yoel Martin Fornieles

knackassesment's People

Contributors

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