jezen / is-thirteen Goto Github PK
View Code? Open in Web Editor NEWCheck if a number is equal to 13.
Check if a number is equal to 13.
We might want to have a Gitter channel.
There are two "тринадцать" checks: line 41 and duplicate on line 73 in "index.js" file
what if someone maliciously replaces it with code that only tests for 14?
2/10
I think strictEquality === true
must be handled with dedicated * is-true* npm module. It will be more elegant
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 )
Why? The answer is simple
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
only uppercase characters should be allowed
Could we possibly have support for the Roman numerals - XIII ?
My latin scripts don't work with this at the moment :/
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();
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
You are missing many important dotfiles
This is not web (2.0) scale
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.
Working professionals use hex just as often as binary.
false
What if I wanted to use jQuery? Could this be converted into a plugin and be supported?
$.isThirteen(12); // false
$.isThirteen(13); // true
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.
I'd like to use this package in my gulp build script but there's not currently a plugin for it. Please create one.
var is = require('is-thirteen');
var is = require('is');
is.true(is.thirteen(13));
This library need to have a i18n support with dictionnaries
This really needs to be turned into a ruby gem as well
please fix
I would love to use this, but I don't trust npm. Please make sure the module is under 140 characters so we can use this:
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)
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. :(
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
Can I use this for getting 13 as a value in my program?
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.
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
Thirteen is consider to be unlucky. Many people where killed in slasher movies and other low brow cultural artifacts due the proximity to number 13. Your library should be configurable. Don't expect patch, tho. I'm just here to raise the issue.
I find incorrect comments to be very poor quality software artisanship and will not be using this module to compare against the number thirteen.
is("almost thirteen").roughly.thirteen(); should be true!
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.
In light of pull request #74, we should have a steering committee to discuss agenda items related to is-thirteen
We should take minutes every month or so as needed.
I think we should follow the Node conventions in how they transformed their project to have a committee.
https://nodejs.org/en/foundation/tsc/minutes/
We have 8 more seats available for those interested.
Please to fix.
Thanks
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
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
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.
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...
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:
13
changesA declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.