qtools-functional-library 1.1.8 → 1.1.9

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.
@@ -65,13 +65,21 @@ var moduleFunction = function(args = {}) {
65
65
  noSuffix = false,
66
66
  label = '',
67
67
  substitutions = {},
68
- destination = 'stderr'
68
+ destination = 'stderr',
69
+ removeFromSuffix,
70
+ replacementForSuffix='...'
69
71
  } = options;
70
72
 
71
73
  const callerName = commonFunctions.callerName(true, options);
72
74
 
73
75
  const showLabel = label.replace(/\n/g, '');
74
- const suffix = noSuffix ? '' : ` [${callerName}]`;
76
+ let suffix = noSuffix ? '' : ` [${callerName}]`;
77
+
78
+ if (removeFromSuffix){
79
+ suffix=suffix.replace(new RegExp(removeFromSuffix), replacementForSuffix);
80
+ }
81
+
82
+
75
83
  const outputMessage =
76
84
  message
77
85
  .qtTemplateReplace(typeof this == 'object' ? this : {})
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qtools-functional-library",
3
- "version": "1.1.8",
3
+ "version": "1.1.9",
4
4
  "description": "Useful additions to JS prototypes to facilliate chainable, functional (mostly) style. Also make life more convenient.\"",
5
5
  "main": "qtools-functional-library.js",
6
6
  "scripts": {