0.3.1 • Published 1 year ago

require-bro v0.3.1

Weekly downloads
4
License
MIT
Repository
github
Last release
1 year ago

require-bro

require for browsers

Install

$ npm install require-bro

extending npm-version downloads build dependencies

language: English also available in: Spanish

Electron

Compatibility with Electron is experimental from both AMD and UMD modules.

Use

// file more-math.js

var MoreMath = {}; // module

MoreMath.real_roots_quadratic_equation = function(a,b,c){
    var delta=b*b-4*a*c;
    if(delta<0) return [];
    var r=-b/(2*a);
    if(delta==0) return [r];
    return [r-s,r+s];
}

MoreMath.intRandom = function (min, max){
    return Math.floor(Math.random()*(max-min+1)+min);
}
// file other.js

var MoreMath = require('more-math');

console.log(MoreMath.real_roots_quadratic_equation(1,-2,1));
console.log('dice', MoreMath.intRandom(1, 6));
// file index.html

<script src='require-bro.js'></script>
<script src='more-math.js'></script>
<script src='other.js'></script>

require(module-name)

Searchs in the global object window a variable with the same name but in camelCase (or CamelCase)

The required module must be included in previous <scripts> and must have define a global variable with the same name.

Tests with real devices

(tested with self-explain )

NPM versionDeviceOSnav
0.10.0HTC DesireAndroid 2.2.2Android 2.2.2
0.10.0Samgsung Galaxy Note 4Android 5.1.1Samsung Internet 4.0.0
0.10.0Blue Vivo Air LTEAndroid 5.0.2Chrome Mobile 50.0.2661
0.10.0iPad mini RetinaiOS 8.4.0Mobile Safari 8.0.0
0.10.0VMWareWinXPIE 8.0.0

License

MIT

0.3.1

1 year ago

0.3.0

2 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.13

6 years ago

0.1.12

6 years ago

0.1.11

6 years ago

0.1.10

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

7 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.1

8 years ago