@hestia-earth/api 0.16.2 → 0.16.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.
@@ -143,11 +143,13 @@ exports.fileToExt = function (path, extension) {
143
143
  exports.validPathChars = 'A-Za-z\\d.\\-_';
144
144
  exports.replaceInvalidChars = function (value) {
145
145
  return value
146
- .replace(/\s/g, '_')
147
- .replace(/\.$/g, '')
148
- .replace(new RegExp("[^" + exports.validPathChars + "]", 'g'), '')
149
- .replace(new RegExp("(\\.)[^(" + Object.values(SupportedExtensions).map(function (v) { return "." + v; }).join('|') + ")]", 'g'), function (v) { return v.replace('.', '_'); })
150
- .replace(/\^/g, '');
146
+ ? value
147
+ .replace(/\s/g, '_')
148
+ .replace(/\.$/g, '')
149
+ .replace(new RegExp("[^" + exports.validPathChars + "]", 'g'), '')
150
+ .replace(new RegExp("(\\.)[^(" + Object.values(SupportedExtensions).map(function (v) { return "." + v; }).join('|') + ")]", 'g'), function (v) { return v.replace('.', '_'); })
151
+ .replace(/\^/g, '')
152
+ : null;
151
153
  };
152
154
  exports.folderFromPath = function (path) {
153
155
  var folders = path.split('/');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hestia-earth/api",
3
- "version": "0.16.2",
3
+ "version": "0.16.4",
4
4
  "description": "Hestia API definitions",
5
5
  "main": "dist/models.js",
6
6
  "typings": "dist/models.d.ts",