@trayio/connector-utils
Advanced tools
Comparing version 0.3.5 to 0.3.6
const { UserInputError } = require('./errors'); | ||
const setErrorMessage = input => | ||
const setErrorMessage = (input) => | ||
`Expected an array but instead received input of type '${typeof input}'.`; | ||
@@ -32,5 +32,5 @@ | ||
const formatArray = arrayToFormat => | ||
const formatArray = (arrayToFormat) => | ||
formatArrayToDelimitedList({ arrayToFormat }); | ||
module.exports = { formatArrayToDelimitedList, formatArray }; |
@@ -10,2 +10,3 @@ /* eslint-disable no-console */ | ||
// const xmlFormatter = require('./xmlFormatter'); | ||
const generateAllTypes = require('./generateAllTypes'); | ||
const { mustachedDDL, DDL } = require('./ddl'); | ||
@@ -48,3 +49,3 @@ const { | ||
}, | ||
removeEmptyObjects: collection => { | ||
removeEmptyObjects: (collection) => { | ||
console.warn(`removeEmptyObjects: ${deprecationWarning}`); | ||
@@ -78,2 +79,3 @@ return removeEmptyObjects(collection); | ||
formatters, | ||
generateAllTypes, | ||
@@ -80,0 +82,0 @@ // Commenting for initial release pending functionality to add paths to treatAsArray |
{ | ||
"name": "@trayio/connector-utils", | ||
"version": "0.3.5", | ||
"version": "0.3.6", | ||
"description": "Common utility functions used in connectors.", | ||
@@ -32,11 +32,11 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"eslint": "^7.11.0", | ||
"eslint": "^7.12.1", | ||
"eslint-config-airbnb-base": "^14.2.0", | ||
"eslint-config-prettier": "^6.12.0", | ||
"eslint-config-prettier": "^6.15.0", | ||
"eslint-plugin-import": "^2.22.1", | ||
"eslint-plugin-jest": "^24.1.0", | ||
"eslint-plugin-jsx-a11y": "^6.3.1", | ||
"eslint-plugin-jsx-a11y": "^6.4.1", | ||
"eslint-plugin-prettier": "^3.1.4", | ||
"eslint-plugin-promise": "^4.2.1", | ||
"jest": "^26.5.3", | ||
"jest": "^26.6.1", | ||
"jest-json-schema": "^2.1.0", | ||
@@ -47,3 +47,3 @@ "jsdoc-to-markdown": "^6.0.1", | ||
"dependencies": { | ||
"deepdash": "^5.3.0", | ||
"deepdash": "^5.3.2", | ||
"deepmerge": "^4.2.2", | ||
@@ -50,0 +50,0 @@ "lodash": "~4.17.20", |
@@ -122,2 +122,6 @@ # Connector-utils | ||
</dd> | ||
</dd> | ||
<dt><a href="#generateAllTypes">generateAllTypes({ exclude = '' })</a></dt> | ||
<dd><p>Helper for generating all available JSON schema types.</p> | ||
</dd> | ||
</dl> | ||
@@ -520,1 +524,26 @@ | ||
``` | ||
<a name="generateAllTypes"></a> | ||
## generateAllTypes({ exclude = '' }) | ||
Helper for generating all available JSON schema types. | ||
You may use the "exclude" parameter to exclude any unwanted type. | ||
**Kind**: global function | ||
| Param | Type | Default | Description | | ||
| ------------- | ------------------- | -------------- | -------------------------------------------------------------------------------- | | ||
| exclude | <code>String</code> | <code>''</code> | String of types separated by comma to be excluded. | | ||
**Example**: | ||
```js | ||
generateAllTypes({}) | ||
// returns ['string','number','object','array','boolean','null'] | ||
generateAllTypes({exclude: 'null, boolean'}) | ||
// returns ['string','number','object','array'] | ||
``` |
57297
17
868
547
Updateddeepdash@^5.3.2