Code Monkey home page Code Monkey logo

hoaxwagen's Introduction

Icon

Hoaxwagen detects Volkswagen in dependencies. Brilliantly.

Build Status npm Not using VW


Why?

Under no circumstances Americans (accoring to Volkswagen package page) shall be deceived! Tests are essential! Tests are one of the most important tools in developers world! But what they did... they deceived us! How dare they do it?! How dare they tamper tests!? Just to get a nice green shield in README!?? It's miserable! If one doesn't want to write tests, he shouldn't be a developer, he really should not! As the head of the Clean-Code Group, I present you the flawless tool for eradicating such a disease! Use it everywhere, anytime!

How would I get it?

Use Yarn. (Or npm). yarn add hoaxwagen or npm install hoaxwagen will do exactly as the commands say. Or, using it as a CLI, yarn global add hoaxwagen or npm install -g hoaxwagen

Not really hard, is it?

How would I use it?

Well, you have two options: either to use require(), or to run a CLI

Using as a library

Somewhere in your javascript project or, even better, in Webpack (or whatever tool you use), include the following code snippet:

require('hoaxwagen').monitor();

// continue adding whatever usually needs to be added

That's it!

And, while building, you might see this:

โœ… Clean!

or, occasionally, this:

๐Ÿšจ WARNING ๐Ÿšจ

Volkswagen ๐Ÿ›ด is detected in the following packages:
โ”œโ”€ ugly-package-1 @ 0.0.0 (yarn.pm/ugly-package-1)
โ”œโ”€ ugly-package-2 @ 0.0.0 (yarn.pm/ugly-package-2)
โ””โ”€ ugly-package-3 @ 0.0.0 (yarn.pm/ugly-package-3)

๐Ÿšง๐Ÿ•ณ BE AWARE OF POSSIBLE FUTURE CONSEQUENCES!

Library methods

There're actually several things you can do apart from observing a warning message in the webpack:

Method name Description Return value Appeared in
isFraud() Checks if Volkswagen library exists in node_modules boolean v1.0.0
monitor() Shows an alert if isFraud() returns true void v1.0.0
getPackages() Returns a list of packages that uses Volkswagen IPackage v1.0.1
interface IPackage {
    name:    string;
    version: string;
    yarn:    string; // URL link to package
    path:    string; // absolute path
}

As an example, let's go over the packages that use Volkswagen:

const hoax = require("hoaxwagen");

const rogues = hoax.getPackages(); // yeah, let's get them out!

rogues.forEach(p => { // p is an IPackage
  console.log(p.name);
});

Running as CLI

Using a CLI is much simpler. Install hoaxwagen like this: yarn global add hoaxwagen or npm i -g hoaxwagen

Run hoaxwagen in terminal, in any javascript project folder, and it will show you how deep the rabbit hole goes:

Well, I've got bad news for you...

  ___ _____   ____  _   _  ____ _  ______  
 |_ _|_   _| / ___|| | | |/ ___| |/ / ___| 
  | |  | |   \___ \| | | | |   | ' /\___ \ 
  | |  | |    ___) | |_| | |___| . \ ___) |
 |___| |_|   |____/ \___/ \____|_|\_\____/ 
                                           
Volkswagen was detected in the following packages:
โ”œโ”€ long-package @ 1.0.0 (yarn.pm/long-package) in /Users/user/path/to/long-package
โ””โ”€ package      @ 2.0.0 (yarn.pm/package)      in /Users/user/path/to/package

or a boring version:

โœ… Clean!

Actually, the use of the rabbit hole allegory was a little too generous. What this library is definitely not going to do is show you the dependency map. Search by yourself. (No offence).

S.H.I.E.L.D.

Look at it! Such a nice shield we've made for you! Feel free to use everywhere!

Not using VW

Including it in your README will make the code run 1000x faster look better than without it, I swear!

Use it in markdown like this:

[![Not using VW](https://hoax.gq/not-using-vw.svg)](https://hoax.gq)

In html use this:

<a href="https://hoax.gq"><img alt="Not using VW" src="https://hoax.gq/not-using-vw.svg"></a>

Or print it out and stick it on the things:

Contributing to Hoaxwagen

Contributions are always welcome. There's no code of conduct, so feel free to do whatever you want, yeah!

But don't forget to give it a star!

Disclaimer

Any similarities with a current event concerning (but not limited to) a multinational automobile manufacturer are purely coincidental.

hoaxwagen's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

hoaxwagen's Issues

I don't get it

Is this so meta it's surpassed my level of understanding humor?

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.