
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
Texas is a library to provide 5 to 7 card hands evaluation for Texas Hold'em on node.js. It uses the look-up table method created by users of the Two Plus Two forum.
npm install texas
The following example generates a random hand and evaluates it:
import _ from 'lodash';
import * as texas from 'texas';
const hand = _.first(texas.deck(), 7);
console.log(_.map(hand, texas.abbr));
console.log(texas.evaluate(hand));
Which will output something like:
[ '5h', '3s', '4d', '7s', '5d', 'Jd', '6d' ]
{ name: 'Straight', value: 20483 }
The following example calculates the odds of a 2-player game after the flop:
import * as texas from 'texas';
const odds = texas.odds([['As', 'Ac'], ['Ks', 'Qc']], ['3d', 'Qc', 'Kd']);
console.log(odds);
Which will output something like:
[ { win: 0.2608695652173913, split: 0 },
{ win: 0.7391304347826086, split: 0 } ]
> texas.extended(3)
'Two of Hearts'
> texas.abbr(15)
'5h'
> texas.unicode(42)
'Q♦'
A benchmark function is included in the library. It evaluates every possible 7 card hands.
> texas.benchmark()
Invalid: 0
High Card: 23294460
One Pair: 58627800
Two Pairs: 31433400
Three of a Kind: 6461620
Straight: 6180020
Flush: 4047644
Full House: 3473184
Four of a Kind: 224848
Straight Flush: 41584
Total: 133784560
891ms // On a Mid 2011 13" MacBook Air
FAQs
Texas Hold'em hand evaluator for Node.js.
The npm package texas receives a total of 1 weekly downloads. As such, texas popularity was classified as not popular.
We found that texas demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.