Coder Social home page Coder Social logo

is-thirteen's People

Contributors

aaroncritchley avatar almenon avatar bakuzan avatar bhalash avatar bluememory14 avatar boypt avatar chrisnruud avatar dependabot[bot] avatar fforres avatar fiskgrodan avatar frg avatar fullstackhacker avatar gandalf- avatar gautamkrishnar avatar glundgren93 avatar gytdau avatar hukuuu avatar jezen avatar jodihum avatar konkked avatar liuru avatar ofek-a avatar paradact avatar prollings avatar rafalio avatar sanket30 avatar srzstephen avatar tommypacker avatar tylersuard avatar wouter0100 avatar

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

is-thirteen's Issues

No tests

what if someone maliciously replaces it with code that only tests for 14?

2/10

Dependency usage

I think strictEquality === true must be handled with dedicated * is-true* npm module. It will be more elegant

Examples with React Native and AngularJS 2

Hello,

I tried using is thirteen with React Native , unfortunately it's very complex for me.

Do you have examples of is-thirteen with React Native and AngularJS2 (We are using a Dependancy Injection Library )

need support for B

As everyone knows, B looks like 13 written closer, when you write 13 closer, it's actually B
we need this:

is('B').thirteen(); // true
is('b').roughly.thirteen(); // true

Native library

While running the code in a time-critical (financial) backend application where performance is our primary concern, rewriting the core algorithms in C improved the overall speed by a factor of 100x

is-thirteen is now available as linkable native library.

I'm planning to add bindings for several interpreted languages as well.

Available functions:

extern void ShowSupportedStrings();
extern bool IsThirteen(const size_t);
extern bool IsNotThirteen(const size_t);
extern bool IsThirteenString(const char *);
extern bool IsThirteenDivisibleBy(const size_t);
extern bool IsThirteenGreaterThan(const size_t x);
extern bool IsThirteenLessThan(const size_t);
extern bool IsRoughlyThirteen(const float);
extern bool IsThirteenWithin(const size_t, const size_t);
extern bool IsThirteenPrime();
extern bool IsThirteenTheNewBlack();

https://github.com/taganaka/is-thirteen-native

Add a roughly equals 13 function

A function that would check if a number is kind of close enough to 13. We could have this as a separate parameter in the main function. true checks for exactly 13, and false checks for about 13.

isThirteen(13, false, true) // true
isThirteen(13, false, false) // true
isThirteen(12.99, false, true) // false
isThirteen(12.99, false, false) // true

Add bower, component & composer support

Currently if someone e.g. uses Bower for frontend libraries they have to copy code from this package & paste into their project which means they won't get automatic updates.

Not enough jQuery

What if I wanted to use jQuery? Could this be converted into a plugin and be supported?

$.isThirteen(12); // false
$.isThirteen(13); // true

Replace noop3 with noop4 (also keep an eye out for noop5)

I noticed that there is a more recent (and probably much better) implementation of the noop algorithm - noop4. Since is-thirteen extensively uses the (now outdated) noop3 library, I think it would greatly benefit from an upgrade to noop4. Obviously before upgrading, unit tests and integration tests should be double checked, since many things can break by such a change.

Gulp plugin

I'd like to use this package in my gulp build script but there's not currently a plugin for it. Please create one.

Ruby Gem

This really needs to be turned into a ruby gem as well

Add epsilon parameter to roughly

Maybe there should be an optional parameter to the roughly function called epsilon which
controls the allowed interval. Could be useful if people wanted to adjust the precision. No, it
will be useful!

(Besides: Where are the templates for creating issues and pull requests? They could be
added too)

This Library is Bad Luck

There needs to be a warning on the README. I tried to install this module, but my VM had a kernel panic and my hypervisor got popped, probably by an in-the-wild BadLock exploit. :(

Add support for Drölf

See: http://www.stupidedia.org/stupi/Dr%C3%B6lf (German)

Drölf (auch Trölf) ist eine ganze, natürlich gebrochen, irrational komplexe Zahl zwischen Zwölf (12), Dreizehn (13) und Zwünf.

In EN:

Drölf (also Trölf) is a natural, fractured, irrational, complex integer between "Zwölf" (12), "Dreizehn" (13) and "Zwünf".

which means that:

is('drölf').roughly.thirteen(); // true

get thirteen?

Can I use this for getting 13 as a value in my program?

Create a Code of Conduct

As a developer, I don't feel motivated to participate in the community of "is-thirteen", unless a proper code of conduct gets added to the project. A code of conduct is a common practice to foster a kind, inclusive, cooperative, and harassment-free community. Adopting a code of conduct would demonstrate that new contributors will be welcomed and respected.

Clearly lacking a delegate overload

I feel this library clearly lacks the ability to pass in a delegate. instead of :-

is(13).thirteen(); // true

let's have some

is(() => { return 13; }).thirteen(); // true
is((i) => { return (i - i) + 13; }).thirteen(); // true

Add a not equals 13 function

This makes my code look dirty:
if(!isThirteen(x, true)) {

I'm proposing a function called isNotThirteen. We would then have something like this instead:
if(isNotThirteen(x, true)) {

This is of the utmost importance for my SaaS startup.

Module isn't adhering to SRP

I feel this module isn't overreaching - if I wanted non strict comparison, then I'd use that module. I don't see why I should pull on all this extra cruft when all I want is the strict comparison functionality.

Modules should be small, and do 1 thing only

Write O'Reilly Definitive Guide

People seem to not understand how to properly use this library. We need to get O'Reilly to publish a Definitive Guide to help people.
is-thirteen-definitive-guide

PHP version

Right now there is nothing like this available to the PHP community. Would you consider a PHP version so we can use it too? Thx

Add support for 1337 and ASCII 13

Carriage returns are ASCII code 13 and should be supported, as well as 7|-|1|2733|\| as it is how an "elite hacker" would want to verify that it is, in fact, thirteen. We must think of who will actually be utilizing is-thirteen, and that's the people chatting in IRC using SSL and talking solely in code.

PR #7 breaks JavaScript compatibility

I'm sorry, but running this on latest bleeding edge node v0.10 yields the following totally weird error I didn't read:

SyntaxError: Unexpected token ;
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:387:25)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Function.Module.runMain (module.js:447:10)
    at startup (node.js:139:18)
    at node.js:999:3

I'm not sure, but I'm guessing its this line...

Create constant for 13 instead of having "magic numbers"

The number 13 is sprayed many places around the lib. I suggest that you create a constant aptly named THIRTEEN just in case one of the following scenarios occur:

  • The number 13 changes
  • What math currently is becomes something else when machines take over
  • Something, something quantum mechanics

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.