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

abl-constants

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

abl-constants - npm Package Compare versions

Comparing version 0.1.11 to 0.2.0

10

package.json
{
"name": "abl-constants",
"version": "0.1.11",
"version": "0.2.0",
"license": "MIT",

@@ -25,7 +25,7 @@ "title": "ABL - constants",

"dependencies": {
"moment-config-trejgun": "git://github.com/TrejGun/moment-config-trejgun.git#v0.0.3"
"moment-config-trejgun": "git://github.com/TrejGun/moment-config-trejgun.git#v0.0.4"
},
"devDependencies": {
"babel-config-trejgun": "git://github.com/TrejGun/babel-config-trejgun.git#v0.0.3",
"eslint-config-trejgun": "git://github.com/TrejGun/eslint-config-trejgun.git#v0.0.2"
"babel-config-trejgun": "git://github.com/TrejGun/babel-config-trejgun.git#v0.0.8",
"eslint-config-trejgun": "git://github.com/TrejGun/eslint-config-trejgun.git#v0.0.3"
},

@@ -37,3 +37,3 @@ "engines": {

"postinstall": "babel -d ./build ./source",
"lint": "eslint source/*",
"lint": "eslint source/* --quiet --fix",
"pull": "git checkout master && git pull origin master",

@@ -40,0 +40,0 @@ "push": "git push origin master --tags && npm publish",

@@ -18,1 +18,2 @@ "use strict";

export const timeFormat = "h:mm a";
export const dateTimeFormat = "MMM-DD-YYYY h:mm a";

@@ -5,4 +5,4 @@ "use strict";

export const title = "My activity Title";
export const description = new Array(40).join("long ") + "description";
export const notes = new Array(40).join("long ") + "notes";
export const description = `${"long ".repeat(40)} description`;
export const notes = `${"long ".repeat(40)} notes`;
export const password = "My5up3r5tr0ngP@55w0rd";

@@ -16,28 +16,1 @@ export const confirm = password;

export const chargeNames = {
tax: "VAT",
fee: "FLEE",
addon: {
food: "Hamburger",
drink: "Coka-Cola"
},
aap: {
adult: "Adult",
youth: "Youth",
child: "Child"
}
};
export const chargeValues = {
tax: 10 * 100,
fee: 10 * 100,
addon: {
food: 10 * 100,
drink: 5 * 100
},
aap: {
adult: 300 * 100,
youth: 200 * 100,
child: 100 * 100
}
};
"use strict";
import moment from "moment";
/* eslint no-use-before-define:0 */
import moment from "moment-config-trejgun";
import {getRandomString} from "./utils/utils.js";
import {title, chargeNames, chargeValues, description, notes, password, confirm} from "./misc.js";
import {title, description, notes, password, confirm} from "./misc.js";
import {testDate, startDate, endDate, untilDate, timeZone} from "./date.js";

@@ -10,10 +12,65 @@ import {phoneNumber} from "./twilio.js";

export const AAPObject = [{
name: chargeNames.aap.adult
export const AAPArray = [{
name: "adult"
}, {
name: chargeNames.aap.youth
name: "youth"
}, {
name: chargeNames.aap.child
name: "child"
}];
export const chargeArray = {
adult: {
name: AAPArray[0].name,
type: "aap",
amount: 300 * 100
},
youth: {
name: AAPArray[1].name,
type: "aap",
amount: 200 * 100
},
child: {
name: AAPArray[2].name,
type: "aap",
amount: 100 * 100
},
food: {
name: "food",
type: "addon",
amount: 10 * 100
},
drink: {
name: "Coka-Cola",
type: "addon",
amount: 10 * 100
},
vat: {
name: "VAT",
type: "tax",
amount: 5,
percentage: true
},
gst: {
name: "GST",
type: "tax",
amount: 10,
percentage: true
},
visa: {
name: "visa",
type: "fee",
amount: 25 * 100
},
tips: {
name: "tips",
type: "fee",
amount: 10 * 100
},
adjustment: {
name: "adjustment",
type: "fee",
amount: 30 * 100
}
};
export function affiliateObject(data) {

@@ -25,3 +82,3 @@ return Object.assign({

domainName: "domain.com",
email: getRandomString().toLowerCase() + "@gmail.com"
email: `${getRandomString().toLowerCase()}@gmail.com`
}, data);

@@ -39,3 +96,3 @@ }

location: locationObject(),
charges: chargeActivityArray()
charges: chargeArray.splice(3, 6)
}, data);

@@ -72,3 +129,3 @@ }

fullName: "Full Customer Name",
email: getRandomString().toLowerCase() + "@gmail.com",
email: `${getRandomString().toLowerCase()}@gmail.com`,
phoneNumber,

@@ -79,38 +136,2 @@ location: locationObject()

export function chargeTimeslotArray() {
return [{
name: chargeNames.aap.adult,
type: "aap",
amount: chargeValues.aap.adult
}, {
name: chargeNames.aap.youth,
type: "aap",
amount: chargeValues.aap.youth
}, {
name: chargeNames.aap.child,
type: "aap",
amount: chargeValues.aap.child
}];
}
export function chargeActivityArray() {
return [{
name: chargeNames.addon.food,
type: "addon",
amount: chargeValues.addon.food
}, {
name: chargeNames.addon.drink,
type: "addon",
amount: chargeValues.addon.drink
}, {
name: chargeNames.tax,
type: "tax",
amount: chargeValues.tax
}, {
name: chargeNames.fee,
type: "fee",
amount: chargeValues.fee
}];
}
export function eventObject(data) {

@@ -130,3 +151,3 @@ return Object.assign({

fullName: "Full Guide Name",
email: getRandomString().toLowerCase() + "@gmail.com",
email: `${getRandomString().toLowerCase()}@gmail.com`,
phoneNumber

@@ -159,3 +180,3 @@ }, data);

phoneNumber,
email: getRandomString().toLowerCase() + "@gmail.com",
email: `${getRandomString().toLowerCase()}@gmail.com`,
location: locationObject(),

@@ -182,3 +203,3 @@ preferences: {

untilTime: untilDate,
charges: chargeTimeslotArray()
charges: chargeArray.splice(0, 3)
}, data);

@@ -195,3 +216,3 @@ }

phoneNumber,
email: getRandomString().toLowerCase() + "@gmail.com",
email: `${getRandomString().toLowerCase()}@gmail.com`,
location: locationObject(),

@@ -214,28 +235,4 @@ role: "operator",

return Object.assign({
charges: [{
name: chargeNames.aap.adult,
type: "aap",
amount: chargeValues.aap.adult
}, {
name: chargeNames.aap.child,
type: "aap",
amount: chargeValues.aap.child
}, {
name: chargeNames.addon.food,
type: "addon",
amount: chargeValues.addon.food
}, {
name: chargeNames.addon.drink,
type: "addon",
amount: chargeValues.addon.drink
}, {
name: chargeNames.tax,
type: "tax",
amount: chargeValues.tax
}, {
name: chargeNames.fee,
type: "fee",
amount: chargeValues.fee
}]
charges: chargeArray
}, data);
}
"use strict";
import moment from "moment";
import tz from "moment-timezone"; // eslint-disable-line no-unused-vars
import moment from "moment-config-trejgun";
import crypto from "crypto";

@@ -10,3 +9,3 @@ import {googleFormat} from "../date.js";

export function getEventInstanceId(eventId, time) {
return eventId + "_" + moment.tz(time, "UTC").format(googleFormat);
return `${eventId}_${moment.tz(time, "UTC").format(googleFormat)}`;
}

@@ -13,0 +12,0 @@

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