Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@engage_so/core

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@engage_so/core - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

14

index.js

@@ -62,15 +62,19 @@ const fetch = require('cross-fetch')

if (!o) {
throw new EngageError('You need to pass an object with at least an id and email')
throw new EngageError('You need to pass an object with at least an id and email.')
}
if (!o.id) {
throw new EngageError('ID missing')
throw new EngageError('ID missing.')
}
if (!o.email || !/^\S+@\S+$/.test(o.email)) {
throw new EngageError('Email missing or invalid')
if (o.email && !/^\S+@\S+$/.test(o.email)) {
throw new EngageError('Email invalid.')
}
const allowed = ['id', 'email', 'number', 'created_at', 'device_token', 'device_platform', 'first_name', 'last_name']
const params = {}
const params = {
meta: {}
}
Object.keys(o).map(k => {
if (allowed.indexOf(k) !== -1) {
params[k] = o[k]
} else {
params.meta[k] = o[k]
}

@@ -77,0 +81,0 @@ })

{
"name": "@engage_so/core",
"version": "1.1.0",
"version": "1.2.0",
"description": "Event driven customer segmentation and targeted engagement.",

@@ -20,3 +20,3 @@ "main": "index.js",

},
"gitHead": "f1ddaf7b48dbdef18d531ce4cd36ab7f9d96ce6b"
"gitHead": "6f62eb5e286f70648309fc5f157edf17ef32fc36"
}
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