Skip to content

Commit

Permalink
[UPDATE] lib, tests, examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
kgryte committed May 9, 2015
1 parent e791dc6 commit fa4af76
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 34 deletions.
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const-min-int8
Min Int8
===
[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Dependencies][dependencies-image]][dependencies-url]

Expand All @@ -17,18 +17,25 @@ For use in the browser, use [browserify](https://github.com/substack/node-browse
## Usage

``` javascript
var foo = require( 'compute-const-min-int8' );
var MIN_INT8 = require( 'compute-const-min-int8' );
```

#### foo( arr )
#### MIN_INT8

What does this function do?
Minimum signed 8-bit integer.

``` javascript
MIN_INT8 === -1 * Math.pow( 2, 7 );
```


## Examples

``` javascript
var foo = require( 'compute-const-min-int8' );
var MIN_INT8 = require( 'compute-const-min-int8' );

console.log( MIN_INT8 );
// returns -127
```

To run the example code from the top-level application directory,
Expand Down
4 changes: 3 additions & 1 deletion examples/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict';

var foo = require( './../lib' );
var MIN_INT8 = require( './../lib' );

console.log( MIN_INT8 );
23 changes: 1 addition & 22 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,5 @@
'use strict';

// MODULES //

// var module_alias = require( 'module_name' );


// FUNCTIONS //

// any private utility functions go here...


// {{ FOO }} //

/**
* FUNCTION: foo()
* {{ foo description }}.
*/
function foo() {

} // end FUNCTION foo()


// EXPORTS //

module.exports = foo;
module.exports = -128; // -1 * Math.pow( 2, 7 )
10 changes: 9 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,15 @@
"keywords": [
"compute.io",
"compute",
"computation"
"computation",
"min",
"minimum",
"int8",
"integer",
"signed",
"8-bit",
"const",
"constant"
],
"bugs": {
"url": "https://github.com/compute-io/const-min-int8/issues"
Expand Down
8 changes: 3 additions & 5 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var // Expectation library:
chai = require( 'chai' ),

// Module to be tested:
lib = require( './../lib' );
CONST = require( './../lib' );


// VARIABLES //
Expand All @@ -20,10 +20,8 @@ var expect = chai.expect,

describe( 'compute-const-min-int8', function tests() {

it( 'should export a function', function test() {
expect( lib ).to.be.a( 'function' );
it( 'should export a number', function test() {
expect( CONST ).to.be.a( 'number' );
});

it( 'should do something' );

});

0 comments on commit fa4af76

Please sign in to comment.