@caweb/webpack 1.3.3 → 1.3.4

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.
package/changelog.txt CHANGED
@@ -1,3 +1,6 @@
1
+ v1.3.4
2
+ - Updated npm packages
3
+
1
4
  v1.3.3
2
5
  - Updated npm packages
3
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caweb/webpack",
3
- "version": "1.3.3",
3
+ "version": "1.3.4",
4
4
  "description": "CAWebPublishing Webpack Configuration",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -37,7 +37,7 @@
37
37
  "dependencies": {
38
38
  "@caweb/a11y-webpack-plugin": "^1.0.9",
39
39
  "@caweb/css-audit-webpack-plugin": "^1.0.12",
40
- "@caweb/html-webpack-plugin": "^1.5.4",
40
+ "@caweb/html-webpack-plugin": "^1.5.5",
41
41
  "@caweb/jshint-webpack-plugin": "^1.0.9"
42
42
  }
43
43
  }
@@ -1,3 +1,6 @@
1
+ v1.5.5
2
+ - Refined toLower, toUpper, toTitleCase, replace helper functions
3
+
1
4
  v1.5.4
2
5
  - Updated npm scripts
3
6
  - Fixed issue with initial scheme selection for plugin
@@ -1,6 +1,15 @@
1
1
  export default function replace(value, search, replace){
2
- // if value is passed
2
+ let response = '';
3
+
4
+ // if parameter is passed
3
5
  if( value && value.length ){
4
- return value.replace(new RegExp(search, "g"), replace);
6
+ response = value.replace(new RegExp(search, "g"), replace);
5
7
  }
8
+
9
+ // if nested content exists
10
+ if( value.fn && value.fn().length ){
11
+ response += value.fn().replace(new RegExp(search, "g"), replace);
12
+ }
13
+
14
+ return response;
6
15
  }
@@ -1,6 +1,16 @@
1
- export default function toLower(value){
2
- // if value is passed
1
+ export default function toLower(value, options){
2
+ let response = '';
3
+
4
+ // if parameter is passed
3
5
  if( value && value.length ){
4
- return value.toLowerCase();
6
+ response = value.toLowerCase();
5
7
  }
8
+
9
+ // if nested content exists
10
+ if( (value.fn && value.fn().length) || (options.fn && options.fn().length ) ){
11
+ let content = value.fn ? value.fn() : options.fn();
12
+ response += content.toLowerCase();
13
+ }
14
+
15
+ return response;
6
16
  }
@@ -1,6 +1,16 @@
1
- export default function toTitleCase(value){
2
- // if value is passed
1
+ export default function toTitleCase(value, options){
2
+ let response = '';
3
+
4
+ // if parameter is passed
3
5
  if( value && value.length ){
4
- return value.split(' ').map( w => w.charAt(0).toUpperCase() + w.slice(1) ).join(' ')
6
+ response = value.split(' ').map( w => w.charAt(0).toUpperCase() + w.slice(1) ).join(' ');
5
7
  }
8
+
9
+ // if nested content exists
10
+ if( (value.fn && value.fn().length) || (options.fn && options.fn().length ) ){
11
+ let content = value.fn ? value.fn() : options.fn();
12
+ response += content.split(' ').map( w => w.charAt(0).toUpperCase() + w.slice(1) ).join(' ');
13
+ }
14
+
15
+ return response;
6
16
  }
@@ -1,6 +1,16 @@
1
- export default function toUpper(value){
2
- // if value is passed
1
+ export default function toUpper(value, options){
2
+ let response = '';
3
+
4
+ // if parameter is passed
3
5
  if( value && value.length ){
4
- return value.toUpperCase();
6
+ response = value.toUpperCase();
5
7
  }
8
+
9
+ // if nested content exists
10
+ if( (value.fn && value.fn().length) || (options.fn && options.fn().length ) ){
11
+ let content = value.fn ? value.fn() : options.fn();
12
+ response += content.toUpperCase();
13
+ }
14
+
15
+ return response;
6
16
  }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@caweb/html-webpack-plugin",
3
- "version": "1.5.4",
3
+ "version": "1.5.5",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@caweb/html-webpack-plugin",
9
- "version": "1.5.4",
9
+ "version": "1.5.5",
10
10
  "license": "ISC",
11
11
  "dependencies": {
12
12
  "@caweb/a11y-webpack-plugin": "^1.0.9",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caweb/html-webpack-plugin",
3
- "version": "1.5.4",
3
+ "version": "1.5.5",
4
4
  "description": "CAWebPublishing Sample Page and Configurations",
5
5
  "main": "index.js",
6
6
  "type": "module",