pyrus-api 3.3.1 → 3.3.2

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.
@@ -127,19 +127,19 @@ function trimTrailingSlash(url) {
127
127
  return url.endsWith("/") ? url.slice(0, -1) : url;
128
128
  }
129
129
  function toDateTimeString(date) {
130
- if (typeof date !== "string")
131
- date = date.toISOString();
132
- return date.split(".")[0] + "Z";
130
+ if (typeof date === "string")
131
+ return date;
132
+ return date.toISOString().split(".")[0] + "Z";
133
133
  }
134
134
  function toDateString(date) {
135
- if (typeof date !== "string")
136
- date = date.toISOString();
137
- return date.split("T")[0];
135
+ if (typeof date === "string")
136
+ return date;
137
+ return date.toISOString().split("T")[0];
138
138
  }
139
139
  function toTimeString(date) {
140
- if (typeof date !== "string")
141
- date = date.toISOString();
142
- return date.split("T")[1].slice(0, 5);
140
+ if (typeof date === "string")
141
+ return date;
142
+ return date.toISOString().split("T")[1].slice(0, 5);
143
143
  }
144
144
  function processFilters(filters) {
145
145
  if (!filters)
@@ -125,19 +125,19 @@ function trimTrailingSlash(url) {
125
125
  return url.endsWith("/") ? url.slice(0, -1) : url;
126
126
  }
127
127
  function toDateTimeString(date) {
128
- if (typeof date !== "string")
129
- date = date.toISOString();
130
- return date.split(".")[0] + "Z";
128
+ if (typeof date === "string")
129
+ return date;
130
+ return date.toISOString().split(".")[0] + "Z";
131
131
  }
132
132
  function toDateString(date) {
133
- if (typeof date !== "string")
134
- date = date.toISOString();
135
- return date.split("T")[0];
133
+ if (typeof date === "string")
134
+ return date;
135
+ return date.toISOString().split("T")[0];
136
136
  }
137
137
  function toTimeString(date) {
138
- if (typeof date !== "string")
139
- date = date.toISOString();
140
- return date.split("T")[1].slice(0, 5);
138
+ if (typeof date === "string")
139
+ return date;
140
+ return date.toISOString().split("T")[1].slice(0, 5);
141
141
  }
142
142
  function processFilters(filters) {
143
143
  if (!filters)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pyrus-api",
3
- "version": "3.3.1",
3
+ "version": "3.3.2",
4
4
  "description": "Pyrus API client for TypeScript",
5
5
  "repository": {
6
6
  "type": "git",