Skip to content

Commit

Permalink
chore(release): compile latest source and generate latest release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
lykmapipo committed May 29, 2019
1 parent 1d2314a commit 8a2fe4b
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 2 deletions.
33 changes: 33 additions & 0 deletions DOCUMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -680,5 +680,38 @@ const info = processInfo();



#### randomColor([optns])

enerating attractive random colors




##### Parameters

| Name | Type | Description | |
| ---- | ---- | ----------- | -------- |
| optns | `Object` | valid generator options | *Optional* |
| optns.luminosity&#x3D;light | `Object` | controls the luminosity of the generated color. you can specify a string containing `bright`, `light` or<br>`dark`. | *Optional* |




##### Examples

```javascript

const color = randomColor();
//=> #C349D8
```


##### Returns


- `String` random color




*Documentation generated with [doxdox](https://github.com/neogeek/doxdox).*
30 changes: 29 additions & 1 deletion es/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { arch, cpus, endianness, freemem, homedir, hostname, loadavg, networkInt
import { isBoolean, flattenDeep, map, reduce, cloneDeep, isArray, compact as compact$1, isPlainObject, omitBy, uniq as uniq$1, orderBy, merge, isEmpty, pick, words, get, camelCase, includes, every, some, forEach, toUpper, toLower, toString, first } from 'lodash';
import { sync } from 'read-pkg';
import { STATUS_CODES } from 'statuses';
import generateColor from 'randomcolor';

/**
* @name RESOURCE_ACTIONS
Expand Down Expand Up @@ -724,4 +725,31 @@ const processInfo = () => {
return info;
};

export { RESOURCE_ACTIONS, abbreviate, areNotEmpty, bagify, compact, has, hasAll, hasAny, idOf, isNotValue, mapErrorToObject, mapToLower, mapToUpper, mergeObjects, osInfo, pkg, processInfo, scopesFor, sortedUniq, uniq, variableNameFor };
/**
* @function randomColor
* @name randomColor
* @description enerating attractive random colors
* @param {Object} [optns] valid generator options
* @param {Object} [optns.luminosity=light] controls the luminosity of the
* generated color. you can specify a string containing `bright`, `light` or
* `dark`.
* @return {String} random color
* @author lally elias <lallyelias87@mail.com>
* @license MIT
* @since 0.18.0
* @version 0.1.0
* @static
* @public
* @example
*
* const color = randomColor();
* //=> #C349D8
*
*/
const randomColor = (optns = { luminosity: 'light' }) => {
const options = mergeObjects(optns);
const color = generateColor(options);
return color;
};

export { RESOURCE_ACTIONS, abbreviate, areNotEmpty, bagify, compact, has, hasAll, hasAny, idOf, isNotValue, mapErrorToObject, mapToLower, mapToUpper, mergeObjects, osInfo, pkg, processInfo, randomColor, scopesFor, sortedUniq, uniq, variableNameFor };
29 changes: 29 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const os = require('os');
const lodash = require('lodash');
const readPkg = require('read-pkg');
const statuses = require('statuses');
const generateColor = require('randomcolor');

/**
* @name RESOURCE_ACTIONS
Expand Down Expand Up @@ -726,6 +727,33 @@ const processInfo = () => {
return info;
};

/**
* @function randomColor
* @name randomColor
* @description enerating attractive random colors
* @param {Object} [optns] valid generator options
* @param {Object} [optns.luminosity=light] controls the luminosity of the
* generated color. you can specify a string containing `bright`, `light` or
* `dark`.
* @return {String} random color
* @author lally elias <lallyelias87@mail.com>
* @license MIT
* @since 0.18.0
* @version 0.1.0
* @static
* @public
* @example
*
* const color = randomColor();
* //=> #C349D8
*
*/
const randomColor = (optns = { luminosity: 'light' }) => {
const options = mergeObjects(optns);
const color = generateColor(options);
return color;
};

exports.RESOURCE_ACTIONS = RESOURCE_ACTIONS;
exports.abbreviate = abbreviate;
exports.areNotEmpty = areNotEmpty;
Expand All @@ -743,6 +771,7 @@ exports.mergeObjects = mergeObjects;
exports.osInfo = osInfo;
exports.pkg = pkg;
exports.processInfo = processInfo;
exports.randomColor = randomColor;
exports.scopesFor = scopesFor;
exports.sortedUniq = sortedUniq;
exports.uniq = uniq;
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import pkg from './package.json';
export default [
{
input: 'src/index.js',
external: ['lodash', 'read-pkg', 'statuses', 'os'],
external: ['lodash', 'read-pkg', 'statuses', 'os', 'randomcolor'],
output: [
{
file: pkg.main,
Expand Down

0 comments on commit 8a2fe4b

Please sign in to comment.