Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rando-js

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rando-js - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

README.md

7

dist/rando.js

@@ -57,5 +57,6 @@ 'use strict';

key: 'roll',
value: function roll(dice, sides) {
dice = dice || 1;
sides = sides || 20;
value: function roll() {
var dice = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
var sides = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 20;
return dice * (Math.floor(sides * Math.random()) + 1);

@@ -62,0 +63,0 @@ }

@@ -1,2 +0,2 @@

"use strict";function _classCallCheck(n,r){if(!(n instanceof r))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function n(n,r){for(var a=0;a<r.length;a++){var e=r[a];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(n,e.key,e)}}return function(r,a,e){return a&&n(r.prototype,a),e&&n(r,e),r}}(),Random=function(){function n(){_classCallCheck(this,n)}return _createClass(n,null,[{key:"coinFlip",value:function(){return Math.round(Math.random())}},{key:"inRange",value:function(n,r){return Math.round(Math.random()*(r-n)+n)}},{key:"fromArray",value:function(n){return n[Math.floor(Math.random()*n.length)]}},{key:"roll",value:function(n,r){return n=n||1,r=r||20,n*(Math.floor(r*Math.random())+1)}}]),n}();exports.Random=Random;
"use strict";function _classCallCheck(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function n(n,e){for(var r=0;r<e.length;r++){var a=e[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(n,a.key,a)}}return function(e,r,a){return r&&n(e.prototype,r),a&&n(e,a),e}}(),Random=function(){function n(){_classCallCheck(this,n)}return _createClass(n,null,[{key:"coinFlip",value:function(){return Math.round(Math.random())}},{key:"inRange",value:function(n,e){return Math.round(Math.random()*(e-n)+n)}},{key:"fromArray",value:function(n){return n[Math.floor(Math.random()*n.length)]}},{key:"roll",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20;return n*(Math.floor(e*Math.random())+1)}}]),n}();exports.Random=Random;
//# sourceMappingURL=dist/rando.min.js.map
{
"name": "rando-js",
"version": "0.1.0",
"version": "0.1.1",
"description": "Randomization utilities for NodeJS in es6",

@@ -5,0 +5,0 @@ "main": "rando.js",

@@ -38,5 +38,3 @@ 'use strict';

static roll(dice, sides) {
dice = dice || 1;
sides = sides || 20;
static roll(dice = 1, sides = 20) {
return dice * (Math.floor(sides * Math.random()) + 1);

@@ -43,0 +41,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc