New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@trayio/connector-utils

Package Overview
Dependencies
Maintainers
10
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@trayio/connector-utils - npm Package Compare versions

Comparing version 0.0.1 to 0.1.0

32

lib/index.js

@@ -18,2 +18,4 @@ const deepMapKeys = require('./deepMapKeys');

} = require('./errors');
const deprecationWarning =
'Nested use of this method is deprecated. Please import from top level of the library.';

@@ -36,10 +38,30 @@ module.exports = {

deepMap: {
deepMapKeys,
removeEmptyObjects,
deepMapKeys: (collection, iteratee) => {
console.warn(`deepMapKeys: ${deprecationWarning}`);
return deepMapKeys(collection, iteratee);
},
removeEmptyObjects: collection => {
console.warn(`removeEmptyObjects: ${deprecationWarning}`);
return removeEmptyObjects(collection);
},
},
schema: {
lookup,
mustachedDDL,
DDL,
lookup: (message, step_settings = {}) => {
console.warn(`lookup: ${deprecationWarning}`);
return lookup(message, step_settings);
},
mustachedDDL: (object, text, value, isInteger = false) => {
console.warn(`mustachedDDL: ${deprecationWarning}`);
return mustachedDDL(object, text, value, isInteger);
},
DDL: (object, textPath, valuePath) => {
console.warn(`DDL: ${deprecationWarning}`);
return DDL(object, textPath, valuePath);
},
},
deepMapKeys,
removeEmptyObjects,
lookup,
mustachedDDL,
DDL,
// Commenting for initial release pending functionality to add paths to treatAsArray

@@ -46,0 +68,0 @@ // xml: {

2

package.json
{
"name": "@trayio/connector-utils",
"version": "0.0.1",
"version": "0.1.0",
"description": "Common utility functions used in connectors.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

# Connector-utils
Common utility functions used in connectors.
## Usage
## Installation
TODO: add usage guide
The `connector-utils` package will be inherently included as part of a new connector scaffold (as part of the Trayio yeoman generator).
When adding the package as part of an existing connector, first ensure you have the appropriate `.npmrc` present, then in your terminal, run:
```
npm i @trayio/connector-utils --save
```
## Basic Usage
To require the package, require as `@trayio/connector-utils`:
```
const utils = require('@trayio/connector-utils')
```
This will give full access to the library. We can then reference utilities such as `UserInputError` by using:
```
utils.error.UserInputError('custom error message')
```
A better usage alternative is to use destructuring, as in the example:
```
const { UserInputError } = require('@trayio/connector-utils/lib/errors')
```
A full breakdown of available utilities is included in the documentation below.
Please be sure to add any discovered issues or improvement recommendations to the `Issues` tab of this repo.
# Documentation

@@ -305,2 +330,2 @@

| --- | --- | --- |
| collection | <code>Object</code> | The collection from which to remove empty objects. |
| collection | <code>Object</code> | The collection from which to remove empty objects. |
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc