skapi-js
Advanced tools
Comparing version 1.0.99-beta.0 to 1.0.100-beta.0
@@ -28,3 +28,3 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
constructor(service, owner, options, __etc) { | ||
this.version = '1.0.99'; | ||
this.version = '1.0.100'; | ||
this.session = null; | ||
@@ -31,0 +31,0 @@ this.connection = null; |
@@ -450,18 +450,11 @@ import SkapiError from '../main/error'; | ||
let tp = indexTypes[query.index.name]; | ||
if (typeof tp === 'string') { | ||
if (typeof v === tp) { | ||
if (!v) { | ||
return; | ||
} | ||
return validator.specialChars(v, 'index.value', false, true); | ||
} | ||
else { | ||
throw new SkapiError(`"index.value" should be type: ${tp}.`, { code: 'INVALID_PARAMETER' }); | ||
} | ||
} | ||
if (typeof tp === 'function') { | ||
return tp(v); | ||
} | ||
if (tp !== typeof v) { | ||
throw new SkapiError(`"index.value" should be type: ${tp}.`, { code: 'INVALID_PARAMETER' }); | ||
} | ||
return v; | ||
} | ||
if (typeof v === 'number') { | ||
else if (typeof v === 'number') { | ||
if (v > __index_number_range || v < -__index_number_range) { | ||
@@ -468,0 +461,0 @@ throw new SkapiError(`Number value should be within range -${__index_number_range} ~ +${__index_number_range}`, { code: 'INVALID_PARAMETER' }); |
{ | ||
"name": "skapi-js", | ||
"version": "1.0.99-beta.0", | ||
"version": "1.0.100-beta.0", | ||
"description": "Skapi: Backend API for HTML frontend.", | ||
@@ -5,0 +5,0 @@ "main": "dist/skapi.module.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
2036044
6412