docs

v0.0.1arrow_drop_down
v0.0.1
STATUS
Passing
DOWNLOADS
0
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
7 years ago
SIZE
N/A
Sums two numbers.
1 contributor
Install docs as a package?
Copied
npm i @bit/bit.extensions.defaults.docs
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
No preview available
modifieddraft
No preview available
modifieddraft
No preview available
modifieddraft
chevron_left
chevron_right

Sums two numbers.

descriptionTag ()

Adds two numbers.

descTag ()

Adds two numbers.

first (
array:[]
) : (* | null)

returns the first element of an array reference.

Example
```js
  first([1, 2, 3]) // => 1
  first(['a', 'b', 'c']) // => 'a'
```
Argument
array: []
Returns
(* | null)

first element of given array

add (
a:number,
b:number
) : number

Adds two numbers.

Example
//-
// Adds two numbers
//-
add(2, 3);
//=>
// 5
//=>
Arguments
a: number

The first number in an addition.

b: number

The second number in an addition.

Returns
number

Returns the total.

Babel-based transpiling environment for Preact components

Bit build enviroment for transpiling Preact components using Bit.

How to use?

Import the environment

 bit import bit.envs/compilers/preact -c

What’s inside

constructor (
x:number,
y:number
)

Create a point.

Arguments
x: number

The x value.

y: number

The y value.

getX () : number

Get the x value.

Returns
number

The x value.

getY () : number

Get the y value.

Returns
number

The y value.

fromString (
str:string
) : Point

Convert a string containing two comma-separated numbers into a point.

Argument
str: string

The string containing two comma-separated numbers.

Returns
Point

A Point object.

add (
a:number,
b:number
) : number

Adds two numbers.

Example
_.add(6, 4);
// => 10
Arguments
a: number

The first number in an addition.

b: number

The second number in an addition.

Returns
number

Returns the total.

Testing various params options

Properties
NameTypeDescription
defaults
object

The default values for parties.

defaults.players
number

The default number of players.

defaults.level
string

The default level for the party.

defaults.treasure
object

The default treasure.

defaults.treasure.gold
number

How much gold the party starts with.

Test Summary

JSDoc Parser Function Declaration should have all the proper keys

Pass

JSDoc Parser Function Declaration should extract the correct name

Pass

JSDoc Parser Function Declaration should extract the correct description

Pass

JSDoc Parser Function Declaration should extract the correct args

Pass

JSDoc Parser Function Declaration should extract the correct returns

Pass

JSDoc Parser Function Declaration should extract the correct access from the @public annotation

Pass

JSDoc Parser Function Declaration should extract the static attribute from the @static annotation

Pass

JSDoc Parser Method Declaration and Class Declaration should be a populated array

Pass

JSDoc Parser Method Declaration and Class Declaration should recognize the constructor

Pass

JSDoc Parser Method Declaration and Class Declaration should extract the constructor’s args correctly

Pass

JSDoc Parser Method Declaration and Class Declaration should recognize the getX method

Pass

JSDoc Parser Method Declaration and Class Declaration should recognize the getY method

Pass

JSDoc Parser Method Declaration and Class Declaration should recognize the fromString method as the last doclet

Pass

JSDoc Parser Variable Declaration should be an array of one Doclet

Pass

JSDoc Parser Variable Declaration should parse the doc correctly

Pass

JSDoc Parser Various Param Types should recognize "" as ""

Pass

JSDoc Parser Various Param Types should recognize "[]" as "[]"

Pass

JSDoc Parser Various Param Types should recognize Union type correctly

Pass

JSDoc Parser Various Param Types should recognize custom type correctly

Pass

JSDoc Parser Various Param Types should recognize Object type

Pass

JSDoc Parser Various Param Types should recognize Function type

Pass

JSDoc Parser Various Param Types should recognize Array of one type

Pass

JSDoc Parser Various Param Types should recognize Array of union

Pass

JSDoc Parser Flow Type File should parse the file with no errors

Pass

JSDoc Parser Description Tag should ignore an invalid description

Pass

JSDoc Parser Description Tag should recognize the description tag

Pass

JSDoc Parser Description Tag should recognize the synonym “desc”

Pass

JSDoc Parser Access property should find only public functions

Pass

JSDoc Parser Properties property should parse the property tag correctly

Pass

JSDoc Parser Anonymous Function should parse the name properly

Pass

JSDoc Parser Anonymous Function should parse the args properly

Pass
Help and resources