npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

adobe-code-challenge

v0.0.0

Published

A command line application to take an input JSON file and remove duplicates from the file.

Downloads

3

Readme

Coding Challenge

An open-ended take home coding challenge I received while interviewing for Marketo

The Rules

Take a variable number of identically structured JSON records and de-duplicate the set.

An example file of records is given in the accompanying 'leads.json'. Output should be same format, with dups reconciled

according to the following rules:

  1. The data from the newest date should be preferred

  2. duplicate IDs count as dups. Duplicate emails count as dups. Duplicate values elsewhere do not count as dups.

  3. If the dates are identical the data from the record provided last in the list should be preferred

Simplifying assumption: the program can do everything in memory (don't worry about large files)

The application should also provide a log of changes including some representation of the source record, the output record and the individual field changes.

(value from and value to) for each field.

You can use any language you prefer.

Prerequisites

Node - https://nodejs.org/en/download/

Installing

From git

git clone https://github.com/nkoz18/adobe-code-challenge.git
cd adobe-code-challenge
npm install

From npm

npm install adobe-code-challenge

Usage

The program is a command line application that takes two arguments. The first is the input file and the second is the path where the output file will be saved.

The log is written to the root of the project. It is called 'combined.log' and its formatted in JSON. The log keeps track of when and why (which duplicate property) each entry was removed from the JSON.

node removeduplicates.js "./path/to/input.json" "./path/to/output.json"

Running the tests

Testing is done with Mocha.

After installing, you can simply run the following:

npm test

The testing script is located at test/test.js. I am using the Node.js native assertion module.

Built With

Authors

License

This project is licensed under the ISC License (ISC)