@lowdefy/operators-change-case 4.0.0-rc.1 → 4.0.0-rc.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -41,7 +41,7 @@ const prepRegex = (prop, location)=>{
41
41
  throw new Error(`Operator Error: ${e.message}. Received: ${JSON.stringify(prop)} at ${location}.`);
42
42
  }
43
43
  };
44
- const prep = (args, { location })=>{
44
+ const prep = (args, { location })=>{
45
45
  const options = args[1];
46
46
  if (!type.isNone(options) && !type.isObject(options)) {
47
47
  throw new Error(`Operator Error: options must be an object. Received ${JSON.stringify(options)} at ${location}.`);
@@ -56,7 +56,7 @@ const prep = (args, { location })=>{
56
56
  }
57
57
  return args;
58
58
  };
59
- const convertArray = ({ methodName , on , options })=>{
59
+ const convertArray = ({ methodName, on, options })=>{
60
60
  return on.map((item)=>{
61
61
  if (type.isString(item)) {
62
62
  return changeCase[methodName](item, options);
@@ -64,7 +64,7 @@ const convertArray = ({ methodName , on , options })=>{
64
64
  return item;
65
65
  });
66
66
  };
67
- const convertObject = ({ methodName , on , options })=>{
67
+ const convertObject = ({ methodName, on, options })=>{
68
68
  const result = {};
69
69
  const keyConverter = get(options, 'convertKeys') ? (key)=>changeCase[methodName](key, options) : (key)=>key;
70
70
  const valueConverter = get(options, 'convertValues', {
@@ -79,7 +79,7 @@ const convertObject = ({ methodName , on , options })=>{
79
79
  });
80
80
  return result;
81
81
  };
82
- const makeCaseChanger = ({ methodName })=>(on, options = {})=>{
82
+ const makeCaseChanger = ({ methodName })=>(on, options = {})=>{
83
83
  if (type.isString(on)) {
84
84
  return changeCase[methodName](on, options);
85
85
  }
@@ -117,7 +117,7 @@ Object.keys(changeCase).forEach((methodName)=>{
117
117
  prep
118
118
  };
119
119
  });
120
- function change_case({ params , location , methodName }) {
120
+ function change_case({ params, location, methodName }) {
121
121
  return runClass({
122
122
  functions,
123
123
  location,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/operators-change-case",
3
- "version": "4.0.0-rc.1",
3
+ "version": "4.0.0-rc.11",
4
4
  "license": "Apache-2.0",
5
5
  "description": "",
6
6
  "homepage": "https://lowdefy.com",
@@ -42,19 +42,19 @@
42
42
  "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js"
43
43
  },
44
44
  "dependencies": {
45
- "@lowdefy/helpers": "4.0.0-rc.1",
46
- "@lowdefy/operators": "4.0.0-rc.1",
45
+ "@lowdefy/helpers": "4.0.0-rc.11",
46
+ "@lowdefy/operators": "4.0.0-rc.11",
47
47
  "change-case": "4.1.2"
48
48
  },
49
49
  "devDependencies": {
50
- "@swc/cli": "0.1.59",
51
- "@swc/core": "1.3.24",
52
- "@swc/jest": "0.2.24",
53
- "jest": "28.1.0",
54
- "jest-environment-jsdom": "28.1.0"
50
+ "@swc/cli": "0.1.62",
51
+ "@swc/core": "1.3.92",
52
+ "@swc/jest": "0.2.29",
53
+ "jest": "28.1.3",
54
+ "jest-environment-jsdom": "28.1.3"
55
55
  },
56
56
  "publishConfig": {
57
57
  "access": "public"
58
58
  },
59
- "gitHead": "ecc4f16c19eede929eda177db524cf13a8053379"
59
+ "gitHead": "dbc49d3688a6d2f44de25cc3f4bc071627f7ebfa"
60
60
  }