-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into greenkeeper/update-all
- Loading branch information
Showing
63 changed files
with
890 additions
and
469 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
languages: | ||
JavaScript: true | ||
exclude_paths: | ||
- "js/dist/*.js" | ||
- "js/dist/**/*.js" | ||
- "test/*.js" | ||
- "test/**/*.js" | ||
- "doc/**" | ||
- "lib/**" | ||
- "test/**" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,10 @@ | ||
# Logs | ||
logs | ||
*.log | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directory | ||
# Commenting this out is preferred by some people, see | ||
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- | ||
node_modules | ||
jspm_packages | ||
|
||
# Users Environment Variables | ||
.lock-wscript | ||
# Coverage directory used by nyc | ||
coverage | ||
.nyc_output | ||
|
||
# groc | ||
doc | ||
# Documentation | ||
gh-pages |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
language: node_js | ||
|
||
node_js: | ||
- "node" | ||
- node | ||
|
||
install: | ||
- npm -d install | ||
- npm install | ||
|
||
script: | ||
- npm test | ||
- npm run cover | ||
|
||
after_success: | ||
- ./node_modules/.bin/coveralls < coverage/lcov.info || true | ||
- ./node_modules/.bin/codeclimate < coverage/lcov.info || true | ||
- bash <(curl -s https://codecov.io/bash) || true | ||
- coveralls < coverage/lcov.info || true | ||
- codeclimate-test-reporter < coverage/lcov.info || true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,19 @@ | ||
[js-random](http://aureooms.github.io/js-random) | ||
[@aureooms/js-random](https://aureooms.github.io/js-random) | ||
== | ||
|
||
Randomness code bricks for JavaScript. | ||
<img src="https://cdn.rawgit.com/aureooms/js-random/master/media/sketch.png" width="864"> | ||
|
||
Randomness algorithms for JavaScript. | ||
See [docs](https://aureooms.github.io/js-random). | ||
Parent is [@aureooms/js-algorithms](https://aureooms.github.io/js-algorithms). | ||
|
||
[![NPM license](http://img.shields.io/npm/l/aureooms-js-random.svg?style=flat)](https://raw.githubusercontent.com/aureooms/js-random/master/LICENSE) | ||
[![NPM version](http://img.shields.io/npm/v/aureooms-js-random.svg?style=flat)](https://www.npmjs.org/package/aureooms-js-random) | ||
[![Bower version](http://img.shields.io/bower/v/aureooms-js-random.svg?style=flat)](http://bower.io/search/?q=aureooms-js-random) | ||
[![Build Status](http://img.shields.io/travis/aureooms/js-random.svg?style=flat)](https://travis-ci.org/aureooms/js-random) | ||
[![Coverage Status](http://img.shields.io/coveralls/aureooms/js-random.svg?style=flat)](https://coveralls.io/r/aureooms/js-random) | ||
[![Dependencies Status](http://img.shields.io/david/aureooms/js-random.svg?style=flat)](https://david-dm.org/aureooms/js-random#info=dependencies) | ||
[![devDependencies Status](http://img.shields.io/david/dev/aureooms/js-random.svg?style=flat)](https://david-dm.org/aureooms/js-random#info=devDependencies) | ||
[![Code Climate](http://img.shields.io/codeclimate/github/aureooms/js-random.svg?style=flat)](https://codeclimate.com/github/aureooms/js-random) | ||
[![NPM downloads per month](http://img.shields.io/npm/dm/aureooms-js-random.svg?style=flat)](https://www.npmjs.org/package/aureooms-js-random) | ||
[![GitHub issues](http://img.shields.io/github/issues/aureooms/js-random.svg?style=flat)](https://github.com/aureooms/js-random/issues) | ||
[![Inline docs](http://inch-ci.org/github/aureooms/js-random.svg?branch=master&style=shields)](http://inch-ci.org/github/aureooms/js-random) | ||
|
||
Can be managed through [duo](https://github.com/duojs/duo), | ||
[component](https://github.com/componentjs/component), | ||
[bower](https://github.com/bower/bower), or | ||
[npm](https://github.com/npm/npm). | ||
|
||
```js | ||
let random = require( "aureooms-js-random" ) ; | ||
``` | ||
|
||
Example usage: | ||
|
||
```js | ||
random.randfloat( 0 , 1 ) ; // 0.19876947347074747 | ||
random.randfloat( 0 , 1 ) ; // 0.23755912738852203 | ||
|
||
random.randint( 0 , 100 ) ; // 57 | ||
random.randint( 0 , 100 ) ; // 31 | ||
|
||
let a = [ 0 , 1 , 2 , 3 ] ; | ||
|
||
random.sample( 1 , a , 0 , 4 ) ; | ||
a ; // [ 0 , 1 , 2 , 3 ] | ||
|
||
random.sample( 1 , a , 0 , 4 ) ; | ||
a ; // [ 1 , 0 , 2 , 3 ] | ||
|
||
random.shuffle( a , 0 , 4 ) ; | ||
a ; // [ 1 , 3 , 0 , 2 ] | ||
|
||
random.shuffle( a , 0 , 4 ) ; | ||
a ; // [ 3 , 2 , 1 , 0 ] | ||
``` | ||
[![Documentation](https://aureooms.github.io/js-random/badge.svg)](https://aureooms.github.io/js-random/source.html) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
h1, | ||
h2, | ||
.navigation, | ||
.layout-container > header, | ||
footer | ||
{ | ||
border: none; | ||
} | ||
|
||
.project-name { | ||
color: #FC913A; | ||
font-weight: bold; | ||
} | ||
|
||
.layout-container > header > a.repo-url-github { | ||
font-size: inherit; | ||
display: inline; | ||
background: none; | ||
vertical-align: inherit; | ||
} | ||
|
||
.search-box img { | ||
display: none; | ||
} | ||
|
||
.search-box::before{ | ||
content: "search"; | ||
} | ||
|
||
.search-input-edge { | ||
height: 0px; | ||
} | ||
|
||
.search-result { | ||
width: 300px; | ||
margin-left: 42px; | ||
box-shadow: 1px 1px 13px rgba(0,0,0,0.2); | ||
} | ||
|
||
.search-input { | ||
visibility: visible; | ||
} | ||
|
||
.search-result li.search-separator { | ||
text-transform: capitalize; | ||
background-color: #ccc; | ||
} | ||
|
||
span[data-ice="signature"] > span { | ||
/*font-weight: bold;*/ | ||
font-style: italic; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
```js | ||
import { randint , randfloat , sample , shuffle } from 'aureooms-js-random' ; | ||
|
||
randfloat( 0 , 1 ) ; // 0.19876947347074747 | ||
randfloat( 0 , 1 ) ; // 0.23755912738852203 | ||
|
||
randint( 0 , 100 ) ; // 57 | ||
randint( 0 , 100 ) ; // 31 | ||
|
||
let a = [ 0 , 1 , 2 , 3 ] ; | ||
|
||
sample( 1 , a , 0 , 4 ) ; | ||
a ; // [ 0 , 1 , 2 , 3 ] | ||
|
||
sample( 1 , a , 0 , 4 ) ; | ||
a ; // [ 1 , 0 , 2 , 3 ] | ||
|
||
shuffle( a , 0 , 4 ) ; | ||
a ; // [ 1 , 3 , 0 , 2 ] | ||
|
||
shuffle( a , 0 , 4 ) ; | ||
a ; // [ 3 , 2 , 1 , 0 ] | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Can be managed using | ||
[jspm](http://jspm.io) | ||
or [npm](https://github.com/npm/npm). | ||
|
||
### jspm | ||
```terminal | ||
jspm install npm:aureooms-js-random | ||
``` | ||
|
||
### npm | ||
```terminal | ||
npm install aureooms-js-random --save | ||
``` |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
The code needs a ES2015+ polyfill to work, for example | ||
[babel-polyfill](https://babeljs.io/docs/usage/polyfill). | ||
```js | ||
require( 'babel-polyfill' ) ; | ||
// or | ||
import 'babel-polyfill' ; | ||
``` | ||
|
||
Then | ||
```js | ||
const random = require( 'aureooms-js-random' ) ; | ||
// or | ||
import * as random from 'aureooms-js-random' ; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
var domReady = function(callback) { | ||
var state = document.readyState ; | ||
if ( state === 'interactive' || state === 'complete' ) { | ||
callback() ; | ||
} | ||
else { | ||
document.addEventListener('DOMContentLoaded', callback); | ||
} | ||
} ; | ||
|
||
|
||
domReady(function(){ | ||
|
||
var projectname = document.createElement('a'); | ||
projectname.classList.add('project-name'); | ||
projectname.text = 'aureooms/js-random'; | ||
projectname.href = './index.html' ; | ||
|
||
var header = document.getElementsByTagName('header')[0] ; | ||
header.insertBefore(projectname,header.firstChild); | ||
|
||
var testlink = document.querySelector('header > a[data-ice="testLink"]') ; | ||
testlink.href = 'https://coveralls.io/github/aureooms/js-random' ; | ||
testlink.target = '_BLANK' ; | ||
|
||
var searchBox = document.querySelector('.search-box'); | ||
var input = document.querySelector('.search-input'); | ||
|
||
// active search box when focus on searchBox. | ||
input.addEventListener('focus', function(){ | ||
searchBox.classList.add('active'); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"source": "./src", | ||
"destination": "./gh-pages", | ||
"access": [ | ||
"public", | ||
"protected", | ||
"private" | ||
], | ||
"debug": false, | ||
"index": "./README.md", | ||
"package": "./package.json", | ||
"title": "aureooms/js-random", | ||
"test": { | ||
"type": "ava", | ||
"source": "./test/src" | ||
}, | ||
"manual": { | ||
"overview": [ | ||
"./doc/manual/overview.md" | ||
], | ||
"installation": [ | ||
"./doc/manual/installation.md" | ||
], | ||
"usage": [ | ||
"./doc/manual/usage.md" | ||
], | ||
"example": [ | ||
"./doc/manual/example.md" | ||
] | ||
}, | ||
"styles": [ | ||
"./doc/css/style.css" | ||
], | ||
"scripts": [ | ||
"./doc/scripts/header.js" | ||
] | ||
} |
Oops, something went wrong.