Code Monkey home page Code Monkey logo

thanos-js's People

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

thanos-js's Issues

Utils / Logger bug

  • logger.warn() is exported as console.log() instead of console.warn()
  • Code:
    lib/Utils/logger.js
    module.exports.log = (...msg) => console.log(...msg);
    module.exports.warn = (...msg) => console.log(...msg); //TODO: console.warn(...msg)

Odd number of files

What happens when there are odd number of files? Will it leave the odd file as it is or will it wipe out half of its contents?

Will half get deleted?

Probably not worth the time considering what the program does but,

It seems like just doing a random number for every file will allow less than half or more than half depending on the randomness.

Should be a check to ensure exactly half occur.

Could assign a value at random to every file and then only take the top 50%.

This does not make sense

Marvel created the universe.
The universe contains planets.
Planets (sometimes) contains beings (characters).
Thanos did not cut half of the universe itself.
Thanos did not cut half of the planets itselves.
Thanos did snapped half of the beings.
Thanos.js is cutting half of the files, not the characters of these files.

Odds are incorrect

README.md states:

He will wipe out about one third of your files if he snaps fingers without gauntlet. And If he has the gauntlet, he will crush about half of them.

However, the following line actually wipes out about one quarter of your files if he snaps fingers without gauntlet.

const shouldDelete = gonnaUseGlove ? random < 50 : random < 25;

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.