skapi-js 0.2.3 → 0.2.5

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/js/main/skapi.js CHANGED
@@ -22,7 +22,7 @@ export default class Skapi {
22
22
  set user(value) {
23
23
  }
24
24
  constructor(service_id, owner, options) {
25
- this.version = '0.2.3';
25
+ this.version = '0.2.5';
26
26
  this.__disabledAccount = null;
27
27
  this.__cached_requests = {};
28
28
  this.__startKeyHistory = {};
@@ -128,7 +128,12 @@ function normalizeTypedString(v) {
128
128
  case "!S%":
129
129
  return value;
130
130
  case "!N%":
131
- return Number(value) - 4503599627370496;
131
+ let splitDec = value.split('.');
132
+ let calcNumb = Number(splitDec[0]) - 4503599627370496;
133
+ if (splitDec.length === 1) {
134
+ return calcNumb;
135
+ }
136
+ return parseFloat(calcNumb.toString() + '.' + splitDec[1]);
132
137
  case "!B%":
133
138
  return value === '1';
134
139
  case "!L%":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skapi-js",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "Javascript library for Skapi: Complete JAM Stack, front-end driven serverless backend API service.",
5
5
  "main": "./dist/skapi.module.js",
6
6
  "types": "./js/Main.d.ts",