mirror of
https://kevinblog.sytes.net/Code/Jibo-Revival-Group/jibo-cli.git
synced 2026-06-15 12:56:23 +00:00
Initial commit — jibo-cli v3.0.7 with bundled node_modules
This commit is contained in:
21
node_modules/compute-hamming/LICENSE
generated
vendored
Normal file
21
node_modules/compute-hamming/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2015 Athan Reines.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
148
node_modules/compute-hamming/README.md
generated
vendored
Normal file
148
node_modules/compute-hamming/README.md
generated
vendored
Normal file
@@ -0,0 +1,148 @@
|
||||
Hamming Distance
|
||||
===
|
||||
[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Dependencies][dependencies-image]][dependencies-url]
|
||||
|
||||
> Computes the [Hamming distance](http://en.wikipedia.org/wiki/Hamming_distance) between two sequences.
|
||||
|
||||
In [information theory](http://en.wikipedia.org/wiki/Information_theory), the Hamming distance is number of differences between two sequences of the same length. These sequences may be represented as character strings, binary strings, or arrays.
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
``` bash
|
||||
$ npm install compute-hamming
|
||||
```
|
||||
|
||||
For use in the browser, use [browserify](https://github.com/substack/node-browserify).
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
``` javascript
|
||||
var hamming = require( 'compute-hamming' );
|
||||
```
|
||||
|
||||
|
||||
#### hamming( a, b[, accessor] )
|
||||
|
||||
Computes the [Hamming distance](http://en.wikipedia.org/wiki/Hamming_distance) between two sequences. The sequences must be either both equal length `strings` or equal length `arrays`.
|
||||
|
||||
``` javascript
|
||||
var a = 'this is a string.',
|
||||
b = 'thiz iz a string.';
|
||||
|
||||
var dist = hamming( a, b );
|
||||
// returns 2
|
||||
|
||||
var c = [ 5, 23, 2, 5, 9 ],
|
||||
d = [ 3, 21, 2, 5, 14 ];
|
||||
|
||||
dist = hamming( c, d );
|
||||
// returns 3
|
||||
```
|
||||
|
||||
To compute the [Hamming distance](http://en.wikipedia.org/wiki/Hamming_distance) between nested `array` values, provide an accessor `function` for accessing `array` values.
|
||||
|
||||
``` javascript
|
||||
var a = [
|
||||
{'x':2},
|
||||
{'x':4},
|
||||
{'x':5},
|
||||
{'x':3},
|
||||
{'x':8},
|
||||
{'x':2}
|
||||
];
|
||||
|
||||
var b = [
|
||||
[1,3],
|
||||
[2,1],
|
||||
[3,5],
|
||||
[4,3],
|
||||
[5,7],
|
||||
[6,2]
|
||||
];
|
||||
|
||||
function getValue( d, i, j ) {
|
||||
if ( j === 0 ) {
|
||||
return d.x;
|
||||
}
|
||||
return d[ 1 ];
|
||||
}
|
||||
|
||||
var dist = hamming( a, b, getValue );
|
||||
// returns 3
|
||||
```
|
||||
|
||||
The accessor `function` is provided three arguments:
|
||||
|
||||
- __d__: current datum.
|
||||
- __i__: current datum index.
|
||||
- __j__: sequence index; e.g., sequence `a` has index `0` and sequence `b` has index `1`.
|
||||
|
||||
|
||||
## Examples
|
||||
|
||||
To run the example code from the top-level application directory,
|
||||
|
||||
``` bash
|
||||
$ node ./examples/index.js
|
||||
```
|
||||
|
||||
|
||||
## Tests
|
||||
|
||||
### Unit
|
||||
|
||||
Unit tests use the [Mocha](http://mochajs.org) test framework with [Chai](http://chaijs.com) assertions. To run the tests, execute the following command in the top-level application directory:
|
||||
|
||||
``` bash
|
||||
$ make test
|
||||
```
|
||||
|
||||
All new feature development should have corresponding unit tests to validate correct functionality.
|
||||
|
||||
|
||||
### Test Coverage
|
||||
|
||||
This repository uses [Istanbul](https://github.com/gotwarlost/istanbul) as its code coverage tool. To generate a test coverage report, execute the following command in the top-level application directory:
|
||||
|
||||
``` bash
|
||||
$ make test-cov
|
||||
```
|
||||
|
||||
Istanbul creates a `./reports/coverage` directory. To access an HTML version of the report,
|
||||
|
||||
``` bash
|
||||
$ make view-cov
|
||||
```
|
||||
|
||||
|
||||
---
|
||||
## License
|
||||
|
||||
[MIT license](http://opensource.org/licenses/MIT).
|
||||
|
||||
|
||||
## Copyright
|
||||
|
||||
Copyright © 2014-2015. Athan Reines.
|
||||
|
||||
|
||||
[npm-image]: http://img.shields.io/npm/v/compute-hamming.svg
|
||||
[npm-url]: https://npmjs.org/package/compute-hamming
|
||||
|
||||
[travis-image]: http://img.shields.io/travis/compute-io/hamming/master.svg
|
||||
[travis-url]: https://travis-ci.org/compute-io/hamming
|
||||
|
||||
[coveralls-image]: https://img.shields.io/coveralls/compute-io/hamming/master.svg
|
||||
[coveralls-url]: https://coveralls.io/r/compute-io/hamming?branch=master
|
||||
|
||||
[dependencies-image]: http://img.shields.io/david/compute-io/hamming.svg
|
||||
[dependencies-url]: https://david-dm.org/compute-io/hamming
|
||||
|
||||
[dev-dependencies-image]: http://img.shields.io/david/dev/compute-io/hamming.svg
|
||||
[dev-dependencies-url]: https://david-dm.org/dev/compute-io/hamming
|
||||
|
||||
[github-issues-image]: http://img.shields.io/github/issues/compute-io/hamming.svg
|
||||
[github-issues-url]: https://github.com/compute-io/hamming/issues
|
||||
65
node_modules/compute-hamming/lib/index.js
generated
vendored
Normal file
65
node_modules/compute-hamming/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
'use strict';
|
||||
|
||||
// MODULES //
|
||||
|
||||
var isArray = require( 'validate.io-array' ),
|
||||
isString = require( 'validate.io-string' ),
|
||||
isFunction = require( 'validate.io-function' );
|
||||
|
||||
|
||||
// HAMMING DISTANCE //
|
||||
|
||||
/**
|
||||
* FUNCTION: hamming( a, b, accessor )
|
||||
* Computes the Hamming distance between two sequences.
|
||||
*
|
||||
* @param {String|Array} a - array or string sequence
|
||||
* @param {String|Array} b - array or string sequence
|
||||
* @param {Function} [accessor] - accessor function for accessing array values
|
||||
* @returns {Number} Hamming distance
|
||||
*/
|
||||
function hamming( a, b, clbk ) {
|
||||
var aType = isString( a ),
|
||||
bType = isString( b ),
|
||||
len,
|
||||
d, i;
|
||||
|
||||
if ( !isArray( a ) && !aType ) {
|
||||
throw new TypeError( 'hamming()::invalid input argument. Sequence must be either an array or a string. Value: `' + a + '`.' );
|
||||
}
|
||||
if ( !isArray( b ) && !bType ) {
|
||||
throw new TypeError( 'hamming()::invalid input argument. Sequence must be either an array or a string. Value: `' + b + '`.' );
|
||||
}
|
||||
if ( aType !== bType ) {
|
||||
throw new TypeError( 'hamming()::invalid input arguments. Sequences must be the same type; i.e., both strings or both arrays.' );
|
||||
}
|
||||
if ( arguments.length > 2 ) {
|
||||
if ( !isFunction( clbk ) ) {
|
||||
throw new TypeError( 'hamming()::invalid input argument. Accessor must be a function. Value: `' + clbk + '`.' );
|
||||
}
|
||||
}
|
||||
len = a.length;
|
||||
if ( len !== b.length ) {
|
||||
throw new Error( 'hamming()::invalid input arguments. Sequences must be the same length.' );
|
||||
}
|
||||
d = 0;
|
||||
if ( clbk ) {
|
||||
for ( i = 0; i < len; i++ ) {
|
||||
if ( clbk( a[i], i, 0 ) !== clbk( b[i], i, 1 ) ) {
|
||||
d += 1;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for ( i = 0; i < len; i++ ) {
|
||||
if ( a[ i ] !== b[ i ] ) {
|
||||
d += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return d;
|
||||
} // end FUNCTION hamming()
|
||||
|
||||
|
||||
// EXPORTS //
|
||||
|
||||
module.exports = hamming;
|
||||
21
node_modules/compute-hamming/node_modules/validate.io-array/LICENSE
generated
vendored
Normal file
21
node_modules/compute-hamming/node_modules/validate.io-array/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2015 Athan Reines.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
112
node_modules/compute-hamming/node_modules/validate.io-array/README.md
generated
vendored
Normal file
112
node_modules/compute-hamming/node_modules/validate.io-array/README.md
generated
vendored
Normal file
@@ -0,0 +1,112 @@
|
||||
Array
|
||||
===
|
||||
[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Dependencies][dependencies-image]][dependencies-url]
|
||||
|
||||
> Validates if a value is an array.
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
``` bash
|
||||
$ npm install validate.io-array
|
||||
```
|
||||
|
||||
For use in the browser, use [browserify](https://github.com/substack/node-browserify).
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
``` javascript
|
||||
var isArray = require( 'validate.io-array' );
|
||||
```
|
||||
|
||||
|
||||
#### isArray( value )
|
||||
|
||||
Validates if a value is an `array`.
|
||||
|
||||
``` javascript
|
||||
var value = [];
|
||||
|
||||
var bool = isArray( value );
|
||||
// returns true
|
||||
```
|
||||
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
``` javascript
|
||||
var isArray = require( 'validate.io-array' );
|
||||
|
||||
console.log( isArray( [ 1, 2, 3, 4 ] ) );
|
||||
// returns true
|
||||
|
||||
console.log( isArray( {} ) );
|
||||
// returns false
|
||||
```
|
||||
|
||||
|
||||
To run the example code from the top-level application directory,
|
||||
|
||||
``` bash
|
||||
$ node ./examples/index.js
|
||||
```
|
||||
|
||||
|
||||
## Tests
|
||||
|
||||
### Unit
|
||||
|
||||
Unit tests use the [Mocha](http://mochajs.org) test framework with [Chai](http://chaijs.com) assertions. To run the tests, execute the following command in the top-level application directory:
|
||||
|
||||
``` bash
|
||||
$ make test
|
||||
```
|
||||
|
||||
All new feature development should have corresponding unit tests to validate correct functionality.
|
||||
|
||||
|
||||
### Test Coverage
|
||||
|
||||
This repository uses [Istanbul](https://github.com/gotwarlost/istanbul) as its code coverage tool. To generate a test coverage report, execute the following command in the top-level application directory:
|
||||
|
||||
``` bash
|
||||
$ make test-cov
|
||||
```
|
||||
|
||||
Istanbul creates a `./reports/coverage` directory. To access an HTML version of the report,
|
||||
|
||||
``` bash
|
||||
$ make view-cov
|
||||
```
|
||||
|
||||
|
||||
---
|
||||
## License
|
||||
|
||||
[MIT license](http://opensource.org/licenses/MIT).
|
||||
|
||||
|
||||
## Copyright
|
||||
|
||||
Copyright © 2014-2015. Athan Reines.
|
||||
|
||||
|
||||
[npm-image]: http://img.shields.io/npm/v/validate.io-array.svg
|
||||
[npm-url]: https://npmjs.org/package/validate.io-array
|
||||
|
||||
[travis-image]: http://img.shields.io/travis/validate-io/array/master.svg
|
||||
[travis-url]: https://travis-ci.org/validate-io/array
|
||||
|
||||
[coveralls-image]: https://img.shields.io/coveralls/validate-io/array/master.svg
|
||||
[coveralls-url]: https://coveralls.io/r/validate-io/array?branch=master
|
||||
|
||||
[dependencies-image]: http://img.shields.io/david/validate-io/array.svg
|
||||
[dependencies-url]: https://david-dm.org/validate-io/array
|
||||
|
||||
[dev-dependencies-image]: http://img.shields.io/david/dev/validate-io/array.svg
|
||||
[dev-dependencies-url]: https://david-dm.org/dev/validate-io/array
|
||||
|
||||
[github-issues-image]: http://img.shields.io/github/issues/validate-io/array.svg
|
||||
[github-issues-url]: https://github.com/validate-io/array/issues
|
||||
16
node_modules/compute-hamming/node_modules/validate.io-array/lib/index.js
generated
vendored
Normal file
16
node_modules/compute-hamming/node_modules/validate.io-array/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* FUNCTION: isArray( value )
|
||||
* Validates if a value is an array.
|
||||
*
|
||||
* @param {*} value - value to be validated
|
||||
* @returns {Boolean} boolean indicating whether value is an array
|
||||
*/
|
||||
function isArray( value ) {
|
||||
return Object.prototype.toString.call( value ) === '[object Array]';
|
||||
} // end FUNCTION isArray()
|
||||
|
||||
// EXPORTS //
|
||||
|
||||
module.exports = Array.isArray || isArray;
|
||||
77
node_modules/compute-hamming/node_modules/validate.io-array/package.json
generated
vendored
Normal file
77
node_modules/compute-hamming/node_modules/validate.io-array/package.json
generated
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
{
|
||||
"_from": "validate.io-array@>=1.0.3 <2.0.0",
|
||||
"_id": "validate.io-array@1.0.6",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-DeOy7CnPEziggrOO5CZhVKJw6S3Yi7e9e65R1Nl/RTN1vTQKnzjfvks0/8kQ40FP/dsjRAOd4hxmJ7uLa6vxkg==",
|
||||
"_location": "/compute-hamming/validate.io-array",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "validate.io-array@1.0.6",
|
||||
"name": "validate.io-array",
|
||||
"escapedName": "validate.io-array",
|
||||
"rawSpec": "1.0.6",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.0.6"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/compute-hamming"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/validate.io-array/-/validate.io-array-1.0.6.tgz",
|
||||
"_shasum": "5b5a2cafd8f8b85abb2f886ba153f2d93a27774d",
|
||||
"_spec": "validate.io-array@1.0.6",
|
||||
"_where": "/tmp/jibo-npm/jibo-cli-3.0.7",
|
||||
"author": {
|
||||
"name": "Athan Reines",
|
||||
"email": "kgryte@gmail.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/validate-io/array/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Athan Reines",
|
||||
"email": "kgryte@gmail.com"
|
||||
}
|
||||
],
|
||||
"dependencies": {},
|
||||
"deprecated": false,
|
||||
"description": "Validates if a value is an array.",
|
||||
"devDependencies": {
|
||||
"chai": "2.x.x",
|
||||
"coveralls": "^2.11.1",
|
||||
"istanbul": "^0.3.0",
|
||||
"jshint": "2.x.x",
|
||||
"jshint-stylish": "^1.0.0",
|
||||
"mocha": "2.x.x",
|
||||
"proxyquire": "^1.4.0"
|
||||
},
|
||||
"homepage": "https://github.com/validate-io/array#readme",
|
||||
"keywords": [
|
||||
"validate.io",
|
||||
"validate",
|
||||
"validation",
|
||||
"validator",
|
||||
"valid",
|
||||
"array",
|
||||
"is",
|
||||
"isarray",
|
||||
"type",
|
||||
"check"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "./lib",
|
||||
"name": "validate.io-array",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/validate-io/array.git"
|
||||
},
|
||||
"scripts": {
|
||||
"coveralls": "istanbul cover ./node_modules/.bin/_mocha --dir ./reports/coveralls/coverage --report lcovonly -- -R spec && cat ./reports/coveralls/coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./reports/coveralls",
|
||||
"test": "mocha",
|
||||
"test-cov": "istanbul cover ./node_modules/.bin/_mocha --dir ./reports/coverage -- -R spec"
|
||||
},
|
||||
"version": "1.0.6"
|
||||
}
|
||||
21
node_modules/compute-hamming/node_modules/validate.io-function/LICENSE
generated
vendored
Normal file
21
node_modules/compute-hamming/node_modules/validate.io-function/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Athan Reines.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
107
node_modules/compute-hamming/node_modules/validate.io-function/README.md
generated
vendored
Normal file
107
node_modules/compute-hamming/node_modules/validate.io-function/README.md
generated
vendored
Normal file
@@ -0,0 +1,107 @@
|
||||
Function
|
||||
===
|
||||
[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Dependencies][dependencies-image]][dependencies-url]
|
||||
|
||||
> Validates if a value is a function.
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
``` bash
|
||||
$ npm install validate.io-function
|
||||
```
|
||||
|
||||
For use in the browser, use [browserify](https://github.com/substack/node-browserify).
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
``` javascript
|
||||
var isFunction = require( 'validate.io-function' );
|
||||
```
|
||||
|
||||
#### isFunction( value )
|
||||
|
||||
Validates if a `value` is a `function`.
|
||||
|
||||
``` javascript
|
||||
var value = function beep(){};
|
||||
|
||||
var bool = isFunction( value );
|
||||
// returns true
|
||||
```
|
||||
|
||||
|
||||
## Examples
|
||||
|
||||
``` javascript
|
||||
console.log( isFunction( function foo(){} ) );
|
||||
// returns true
|
||||
|
||||
console.log( isFunction( {} ) );
|
||||
// returns false
|
||||
```
|
||||
|
||||
To run the example code from the top-level application directory,
|
||||
|
||||
``` bash
|
||||
$ node ./examples/index.js
|
||||
```
|
||||
|
||||
|
||||
## Tests
|
||||
|
||||
### Unit
|
||||
|
||||
Unit tests use the [Mocha](http://mochajs.org) test framework with [Chai](http://chaijs.com) assertions. To run the tests, execute the following command in the top-level application directory:
|
||||
|
||||
``` bash
|
||||
$ make test
|
||||
```
|
||||
|
||||
All new feature development should have corresponding unit tests to validate correct functionality.
|
||||
|
||||
|
||||
### Test Coverage
|
||||
|
||||
This repository uses [Istanbul](https://github.com/gotwarlost/istanbul) as its code coverage tool. To generate a test coverage report, execute the following command in the top-level application directory:
|
||||
|
||||
``` bash
|
||||
$ make test-cov
|
||||
```
|
||||
|
||||
Istanbul creates a `./reports/coverage` directory. To access an HTML version of the report,
|
||||
|
||||
``` bash
|
||||
$ make view-cov
|
||||
```
|
||||
|
||||
|
||||
---
|
||||
## License
|
||||
|
||||
[MIT license](http://opensource.org/licenses/MIT).
|
||||
|
||||
|
||||
## Copyright
|
||||
|
||||
Copyright © 2014. Athan Reines.
|
||||
|
||||
|
||||
[npm-image]: http://img.shields.io/npm/v/validate.io-function.svg
|
||||
[npm-url]: https://npmjs.org/package/validate.io-function
|
||||
|
||||
[travis-image]: http://img.shields.io/travis/validate-io/function/master.svg
|
||||
[travis-url]: https://travis-ci.org/validate-io/function
|
||||
|
||||
[coveralls-image]: https://img.shields.io/coveralls/validate-io/function/master.svg
|
||||
[coveralls-url]: https://coveralls.io/r/validate-io/function?branch=master
|
||||
|
||||
[dependencies-image]: http://img.shields.io/david/validate-io/function.svg
|
||||
[dependencies-url]: https://david-dm.org/validate-io/function
|
||||
|
||||
[dev-dependencies-image]: http://img.shields.io/david/dev/validate-io/function.svg
|
||||
[dev-dependencies-url]: https://david-dm.org/dev/validate-io/function
|
||||
|
||||
[github-issues-image]: http://img.shields.io/github/issues/validate-io/function.svg
|
||||
[github-issues-url]: https://github.com/validate-io/function/issues
|
||||
45
node_modules/compute-hamming/node_modules/validate.io-function/lib/index.js
generated
vendored
Normal file
45
node_modules/compute-hamming/node_modules/validate.io-function/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
*
|
||||
* VALIDATE: function
|
||||
*
|
||||
*
|
||||
* DESCRIPTION:
|
||||
* - Validates if a value is a function.
|
||||
*
|
||||
*
|
||||
* NOTES:
|
||||
* [1]
|
||||
*
|
||||
*
|
||||
* TODO:
|
||||
* [1]
|
||||
*
|
||||
*
|
||||
* LICENSE:
|
||||
* MIT
|
||||
*
|
||||
* Copyright (c) 2014. Athan Reines.
|
||||
*
|
||||
*
|
||||
* AUTHOR:
|
||||
* Athan Reines. kgryte@gmail.com. 2014.
|
||||
*
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* FUNCTION: isFunction( value )
|
||||
* Validates if a value is a function.
|
||||
*
|
||||
* @param {*} value - value to be validated
|
||||
* @returns {Boolean} boolean indicating whether value is a function
|
||||
*/
|
||||
function isFunction( value ) {
|
||||
return ( typeof value === 'function' );
|
||||
} // end FUNCTION isFunction()
|
||||
|
||||
|
||||
// EXPORTS //
|
||||
|
||||
module.exports = isFunction;
|
||||
79
node_modules/compute-hamming/node_modules/validate.io-function/package.json
generated
vendored
Normal file
79
node_modules/compute-hamming/node_modules/validate.io-function/package.json
generated
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
{
|
||||
"_from": "validate.io-function@>=1.0.2 <2.0.0",
|
||||
"_id": "validate.io-function@1.0.2",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-LlFybRJEriSuBnUhQyG5bwglhh50EpTL2ul23MPIuR1odjO7XaMLFV8vHGwp7AZciFxtYOeiSCT5st+XSPONiQ==",
|
||||
"_location": "/compute-hamming/validate.io-function",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "validate.io-function@1.0.2",
|
||||
"name": "validate.io-function",
|
||||
"escapedName": "validate.io-function",
|
||||
"rawSpec": "1.0.2",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.0.2"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/compute-hamming"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/validate.io-function/-/validate.io-function-1.0.2.tgz",
|
||||
"_shasum": "343a19802ed3b1968269c780e558e93411c0bad7",
|
||||
"_spec": "validate.io-function@1.0.2",
|
||||
"_where": "/tmp/jibo-npm/jibo-cli-3.0.7",
|
||||
"author": {
|
||||
"name": "Athan Reines",
|
||||
"email": "kgryte@gmail.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/validate-io/function/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Athan Reines",
|
||||
"email": "kgryte@gmail.com"
|
||||
}
|
||||
],
|
||||
"dependencies": {},
|
||||
"deprecated": false,
|
||||
"description": "Validates if a value is a function.",
|
||||
"devDependencies": {
|
||||
"chai": "1.x.x",
|
||||
"coveralls": "^2.11.1",
|
||||
"istanbul": "^0.3.0",
|
||||
"jshint": "^2.5.10",
|
||||
"jshint-stylish": "^1.0.0",
|
||||
"mocha": "1.x.x"
|
||||
},
|
||||
"homepage": "https://github.com/validate-io/function#readme",
|
||||
"keywords": [
|
||||
"validate.io",
|
||||
"validate",
|
||||
"validation",
|
||||
"validator",
|
||||
"valid",
|
||||
"function",
|
||||
"is",
|
||||
"isfunction"
|
||||
],
|
||||
"licenses": [
|
||||
{
|
||||
"type": "MIT",
|
||||
"url": "http://www.opensource.org/licenses/MIT"
|
||||
}
|
||||
],
|
||||
"main": "./lib",
|
||||
"name": "validate.io-function",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/validate-io/function.git"
|
||||
},
|
||||
"scripts": {
|
||||
"coveralls": "istanbul cover ./node_modules/.bin/_mocha --dir ./reports/coveralls/coverage --report lcovonly -- -R spec && cat ./reports/coveralls/coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./reports/coveralls",
|
||||
"test": "mocha",
|
||||
"test-cov": "istanbul cover ./node_modules/.bin/_mocha --dir ./reports/coverage -- -R spec"
|
||||
},
|
||||
"version": "1.0.2"
|
||||
}
|
||||
21
node_modules/compute-hamming/node_modules/validate.io-string/LICENSE
generated
vendored
Normal file
21
node_modules/compute-hamming/node_modules/validate.io-string/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Athan Reines.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
110
node_modules/compute-hamming/node_modules/validate.io-string/README.md
generated
vendored
Normal file
110
node_modules/compute-hamming/node_modules/validate.io-string/README.md
generated
vendored
Normal file
@@ -0,0 +1,110 @@
|
||||
String
|
||||
===
|
||||
[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Dependencies][dependencies-image]][dependencies-url]
|
||||
|
||||
> Validates if a value is a string.
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
``` bash
|
||||
$ npm install validate.io-string
|
||||
```
|
||||
|
||||
For use in the browser, use [browserify](https://github.com/substack/node-browserify).
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
``` javascript
|
||||
var isString = require( 'validate.io-string' );
|
||||
```
|
||||
|
||||
#### isString( value )
|
||||
|
||||
Validates if a `value` is a `string`.
|
||||
|
||||
``` javascript
|
||||
var value = 'boop';
|
||||
|
||||
var bool = isString( value );
|
||||
// returns true
|
||||
```
|
||||
|
||||
|
||||
## Examples
|
||||
|
||||
``` javascript
|
||||
console.log( isString( 'beep' ) );
|
||||
// returns true
|
||||
|
||||
console.log( isString( new String( 'beep' ) ) );
|
||||
// returns true
|
||||
|
||||
console.log( isString( 5 ) );
|
||||
// returns false
|
||||
```
|
||||
|
||||
To run the example code from the top-level application directory,
|
||||
|
||||
``` bash
|
||||
$ node ./examples/index.js
|
||||
```
|
||||
|
||||
|
||||
## Tests
|
||||
|
||||
### Unit
|
||||
|
||||
Unit tests use the [Mocha](http://mochajs.org) test framework with [Chai](http://chaijs.com) assertions. To run the tests, execute the following command in the top-level application directory:
|
||||
|
||||
``` bash
|
||||
$ make test
|
||||
```
|
||||
|
||||
All new feature development should have corresponding unit tests to validate correct functionality.
|
||||
|
||||
|
||||
### Test Coverage
|
||||
|
||||
This repository uses [Istanbul](https://github.com/gotwarlost/istanbul) as its code coverage tool. To generate a test coverage report, execute the following command in the top-level application directory:
|
||||
|
||||
``` bash
|
||||
$ make test-cov
|
||||
```
|
||||
|
||||
Istanbul creates a `./reports/coverage` directory. To access an HTML version of the report,
|
||||
|
||||
``` bash
|
||||
$ make view-cov
|
||||
```
|
||||
|
||||
|
||||
---
|
||||
## License
|
||||
|
||||
[MIT license](http://opensource.org/licenses/MIT).
|
||||
|
||||
|
||||
## Copyright
|
||||
|
||||
Copyright © 2014. Athan Reines.
|
||||
|
||||
|
||||
[npm-image]: http://img.shields.io/npm/v/validate.io-string.svg
|
||||
[npm-url]: https://npmjs.org/package/validate.io-string
|
||||
|
||||
[travis-image]: http://img.shields.io/travis/validate-io/string/master.svg
|
||||
[travis-url]: https://travis-ci.org/validate-io/string
|
||||
|
||||
[coveralls-image]: https://img.shields.io/coveralls/validate-io/string/master.svg
|
||||
[coveralls-url]: https://coveralls.io/r/validate-io/string?branch=master
|
||||
|
||||
[dependencies-image]: http://img.shields.io/david/validate-io/string.svg
|
||||
[dependencies-url]: https://david-dm.org/validate-io/string
|
||||
|
||||
[dev-dependencies-image]: http://img.shields.io/david/dev/validate-io/string.svg
|
||||
[dev-dependencies-url]: https://david-dm.org/dev/validate-io/string
|
||||
|
||||
[github-issues-image]: http://img.shields.io/github/issues/validate-io/string.svg
|
||||
[github-issues-url]: https://github.com/validate-io/string/issues
|
||||
45
node_modules/compute-hamming/node_modules/validate.io-string/lib/index.js
generated
vendored
Normal file
45
node_modules/compute-hamming/node_modules/validate.io-string/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
*
|
||||
* VALIDATE: string
|
||||
*
|
||||
*
|
||||
* DESCRIPTION:
|
||||
* - Validates if a value is a string.
|
||||
*
|
||||
*
|
||||
* NOTES:
|
||||
* [1]
|
||||
*
|
||||
*
|
||||
* TODO:
|
||||
* [1]
|
||||
*
|
||||
*
|
||||
* LICENSE:
|
||||
* MIT
|
||||
*
|
||||
* Copyright (c) 2014. Athan Reines.
|
||||
*
|
||||
*
|
||||
* AUTHOR:
|
||||
* Athan Reines. kgryte@gmail.com. 2014.
|
||||
*
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* FUNCTION: isString( value )
|
||||
* Validates if a value is a string.
|
||||
*
|
||||
* @param {*} value - value to be validated
|
||||
* @returns {Boolean} boolean indicating whether value is a string
|
||||
*/
|
||||
function isString( value ) {
|
||||
return typeof value === 'string' || Object.prototype.toString.call( value ) === '[object String]';
|
||||
} // end FUNCTION isString()
|
||||
|
||||
|
||||
// EXPORTS //
|
||||
|
||||
module.exports = isString;
|
||||
81
node_modules/compute-hamming/node_modules/validate.io-string/package.json
generated
vendored
Normal file
81
node_modules/compute-hamming/node_modules/validate.io-string/package.json
generated
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
{
|
||||
"_from": "validate.io-string@>=1.0.2 <2.0.0",
|
||||
"_id": "validate.io-string@1.0.2",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-LEVnY6jzi6MxK1+0ngNVU/syGH8WZ9m5EObxWBYCaENQGPkWtOq4Upw2Fltayn2+86cg1L/1ciXVUdkXQ/dUyQ==",
|
||||
"_location": "/compute-hamming/validate.io-string",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "validate.io-string@1.0.2",
|
||||
"name": "validate.io-string",
|
||||
"escapedName": "validate.io-string",
|
||||
"rawSpec": "1.0.2",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.0.2"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/compute-hamming"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/validate.io-string/-/validate.io-string-1.0.2.tgz",
|
||||
"_shasum": "babf3a528b28e4b9e8017e3281fc76001ae6dc2f",
|
||||
"_spec": "validate.io-string@1.0.2",
|
||||
"_where": "/tmp/jibo-npm/jibo-cli-3.0.7",
|
||||
"author": {
|
||||
"name": "Athan Reines",
|
||||
"email": "kgryte@gmail.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/validate-io/string/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Athan Reines",
|
||||
"email": "kgryte@gmail.com"
|
||||
}
|
||||
],
|
||||
"dependencies": {},
|
||||
"deprecated": false,
|
||||
"description": "Validates if a value is a string.",
|
||||
"devDependencies": {
|
||||
"chai": "1.x.x",
|
||||
"coveralls": "^2.11.1",
|
||||
"istanbul": "^0.3.0",
|
||||
"jshint": "^2.5.10",
|
||||
"jshint-stylish": "^1.0.0",
|
||||
"mocha": "1.x.x"
|
||||
},
|
||||
"homepage": "https://github.com/validate-io/string#readme",
|
||||
"keywords": [
|
||||
"validate.io",
|
||||
"validate",
|
||||
"validation",
|
||||
"validator",
|
||||
"valid",
|
||||
"string",
|
||||
"is",
|
||||
"type",
|
||||
"check",
|
||||
"isstring"
|
||||
],
|
||||
"licenses": [
|
||||
{
|
||||
"type": "MIT",
|
||||
"url": "http://www.opensource.org/licenses/MIT"
|
||||
}
|
||||
],
|
||||
"main": "./lib",
|
||||
"name": "validate.io-string",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/validate-io/string.git"
|
||||
},
|
||||
"scripts": {
|
||||
"coveralls": "istanbul cover ./node_modules/.bin/_mocha --dir ./reports/coveralls/coverage --report lcovonly -- -R spec && cat ./reports/coveralls/coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./reports/coveralls",
|
||||
"test": "mocha",
|
||||
"test-cov": "istanbul cover ./node_modules/.bin/_mocha --dir ./reports/coverage -- -R spec"
|
||||
},
|
||||
"version": "1.0.2"
|
||||
}
|
||||
95
node_modules/compute-hamming/package.json
generated
vendored
Normal file
95
node_modules/compute-hamming/package.json
generated
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
{
|
||||
"_from": "compute-hamming@>=1.1.0 <2.0.0",
|
||||
"_id": "compute-hamming@1.1.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-a5ArwLFbSBbiZKv7OUDBt5p1cskcbSQvBK3xiI4kzB4TQ2ksP3JpfMVJIsWPpQuzP1k2h27P9dE0TvkKWJKE4Q==",
|
||||
"_location": "/compute-hamming",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "compute-hamming@1.1.0",
|
||||
"name": "compute-hamming",
|
||||
"escapedName": "compute-hamming",
|
||||
"rawSpec": "1.1.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.1.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/compute-hamming/-/compute-hamming-1.1.0.tgz",
|
||||
"_shasum": "98fa544c0c0147cfc6fa83ad2ec038322e83c6fa",
|
||||
"_spec": "compute-hamming@1.1.0",
|
||||
"_where": "/tmp/jibo-npm/jibo-cli-3.0.7",
|
||||
"author": {
|
||||
"name": "Athan Reines",
|
||||
"email": "kgryte@gmail.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/compute-io/hamming/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Athan Reines",
|
||||
"email": "kgryte@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Philipp Burckhardt",
|
||||
"email": "pburckhardt@outlook.com"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"validate.io-array": "^1.0.3",
|
||||
"validate.io-function": "^1.0.2",
|
||||
"validate.io-string": "^1.0.2"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Computes the Hamming distance between two sequences.",
|
||||
"devDependencies": {
|
||||
"chai": "2.x.x",
|
||||
"coveralls": "^2.11.1",
|
||||
"istanbul": "^0.3.0",
|
||||
"jshint": "2.x.x",
|
||||
"jshint-stylish": "^1.0.0",
|
||||
"mocha": "2.x.x"
|
||||
},
|
||||
"homepage": "https://github.com/compute-io/hamming#readme",
|
||||
"keywords": [
|
||||
"compute.io",
|
||||
"compute",
|
||||
"computation",
|
||||
"hamming",
|
||||
"distance",
|
||||
"similarity",
|
||||
"information theory",
|
||||
"mathematics",
|
||||
"math",
|
||||
"array",
|
||||
"string",
|
||||
"dist",
|
||||
"information",
|
||||
"overlap",
|
||||
"intersect",
|
||||
"difference"
|
||||
],
|
||||
"licenses": [
|
||||
{
|
||||
"type": "MIT",
|
||||
"url": "http://www.opensource.org/licenses/MIT"
|
||||
}
|
||||
],
|
||||
"main": "./lib",
|
||||
"name": "compute-hamming",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/compute-io/hamming.git"
|
||||
},
|
||||
"scripts": {
|
||||
"coveralls": "istanbul cover ./node_modules/.bin/_mocha --dir ./reports/coveralls/coverage --report lcovonly -- -R spec && cat ./reports/coveralls/coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./reports/coveralls",
|
||||
"test": "mocha",
|
||||
"test-cov": "istanbul cover ./node_modules/.bin/_mocha --dir ./reports/coverage -- -R spec"
|
||||
},
|
||||
"version": "1.1.0"
|
||||
}
|
||||
Reference in New Issue
Block a user