Skip to content

Commit

Permalink
chore(deps): force latest version & audit fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lykmapipo committed Jun 19, 2020
1 parent 1c94b8e commit 91fa465
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 23 deletions.
28 changes: 26 additions & 2 deletions es/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { resolve } from 'path';
import { readFileSync } from 'fs';
import { arch, cpus, endianness, freemem, homedir, hostname, loadavg, networkInterfaces, platform, release, tmpdir, totalmem, type, uptime } from 'os';
import { isBoolean, cloneDeep, flattenDeep, map, reduce, isArray, compact as compact$1, isPlainObject, omitBy, uniq as uniq$1, orderBy, assign as assign$1, merge, isEmpty, pick, forEach, toLower, startCase, words, get, camelCase, includes, every, some, toUpper, omit, join as join$1, isFunction, find, isError, filter, noop, toString, first } from 'lodash';
import { isBoolean, first, filter, cloneDeep, flattenDeep, map, reduce, isArray, compact as compact$1, isPlainObject, omitBy, uniq as uniq$1, orderBy, assign as assign$1, merge, isEmpty, pick, forEach, toLower, startCase, words, get, camelCase, includes, every, some, toUpper, omit, join as join$1, isFunction, find, isError, noop, toString } from 'lodash';
export { getExtension as mimeExtensionOf, getType as mimeTypeOf } from 'mime';
import { flatten, unflatten } from 'flat';
import { message } from 'statuses';
Expand Down Expand Up @@ -62,6 +62,30 @@ const RESOURCE_ACTIONS = [
*/
const isNotValue = (value) => (isBoolean(value) ? false : !value);

/**
* @function isNotValue
* @name isNotValue
* @description Obtain first valid value
* @param {*} values list of values
* @returns {*} first valid value
* @author lally elias <lallyelias87@gmail.com>
* @license MIT
* @since 0.36.0
* @version 0.1.0
* @static
* @public
* @example
*
* firstValue('a', 'b');
* // => 'a'
*
* firstValue(undefined, 'b');
* // => 'b'
*/
const firstValue = (...values) => {
return first(filter([...values], (value) => !isNotValue(value)));
};

/**
* @function copyOf
* @name copyOf
Expand Down Expand Up @@ -1393,4 +1417,4 @@ const wrapCallback = (cb, ...defaultArgs) => (...replyArgs) => {

// TODO: promiseOrCallback

export { RESOURCE_ACTIONS, abbreviate, areNotEmpty, arrayToObject, assign, autoParse, bagify, compact, copyOf, flat, formatDate, has, hasAll, hasAny, hashOf, idOf, isNotValue, join, mapErrorToObject, mapToLower, mapToUpper, mergeObjects, normalizeError, osInfo, parse, parseMs, parseTemplate, permissionsFor, pkg, pluralize, processInfo, randomColor, safeMergeObjects, scopesFor, singularize, sortedUniq, stringify, stripHtmlTags, unflat, uniq, variableNameFor, wrapCallback };
export { RESOURCE_ACTIONS, abbreviate, areNotEmpty, arrayToObject, assign, autoParse, bagify, compact, copyOf, firstValue, flat, formatDate, has, hasAll, hasAny, hashOf, idOf, isNotValue, join, mapErrorToObject, mapToLower, mapToUpper, mergeObjects, normalizeError, osInfo, parse, parseMs, parseTemplate, permissionsFor, pkg, pluralize, processInfo, randomColor, safeMergeObjects, scopesFor, singularize, sortedUniq, stringify, stripHtmlTags, unflat, uniq, variableNameFor, wrapCallback };
25 changes: 25 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,30 @@ const RESOURCE_ACTIONS = [
*/
const isNotValue = (value) => (lodash.isBoolean(value) ? false : !value);

/**
* @function isNotValue
* @name isNotValue
* @description Obtain first valid value
* @param {*} values list of values
* @returns {*} first valid value
* @author lally elias <lallyelias87@gmail.com>
* @license MIT
* @since 0.36.0
* @version 0.1.0
* @static
* @public
* @example
*
* firstValue('a', 'b');
* // => 'a'
*
* firstValue(undefined, 'b');
* // => 'b'
*/
const firstValue = (...values) => {
return lodash.first(lodash.filter([...values], (value) => !isNotValue(value)));
};

/**
* @function copyOf
* @name copyOf
Expand Down Expand Up @@ -1463,6 +1487,7 @@ exports.autoParse = autoParse;
exports.bagify = bagify;
exports.compact = compact;
exports.copyOf = copyOf;
exports.firstValue = firstValue;
exports.flat = flat;
exports.formatDate = formatDate;
exports.has = has;
Expand Down
32 changes: 16 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lykmapipo/common",
"version": "0.35.1",
"version": "0.36.0",
"description": "Helper utilities for day to day development",
"main": "lib/index.js",
"module": "es/index.js",
Expand Down Expand Up @@ -67,21 +67,21 @@
"eslint-config-airbnb-base": "^14.2.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-import": "^2.21.2",
"eslint-plugin-jsdoc": "^27.0.7",
"eslint-plugin-jsdoc": "^27.1.2",
"eslint-plugin-mocha": "^7.0.1",
"eslint-plugin-prettier": "^3.1.4",
"generate-changelog": "^1.8.0",
"handlebars": "^4.7.6",
"husky": "^4.2.5",
"kind-of": "^6.0.3",
"lint-staged": "^10.2.10",
"lint-staged": "^10.2.11",
"lodash.template": "^4.5.0",
"minimist": "^1.2.5",
"mocha": "^8.0.1",
"nyc": "^15.1.0",
"prettier": "^2.0.5",
"rimraf": "^3.0.2",
"rollup": "^2.16.1",
"rollup": "^2.17.1",
"shelljs": "^0.8.4"
},
"dependencies": {
Expand All @@ -91,7 +91,7 @@
"inflection": ">=1.12.0",
"lodash": ">=4.17.15",
"mime": ">=2.4.6",
"moment": ">=2.26.0",
"moment": ">=2.27.0",
"object-hash": ">=2.0.3",
"parse-json": ">=5.0.0",
"parse-ms": ">=2.1.0",
Expand Down

0 comments on commit 91fa465

Please sign in to comment.