@onehat/data 1.16.7 → 1.16.8

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.
@@ -38,6 +38,15 @@ describe('OneBuildRepository', function() {
38
38
  expect(r._params.test).to.be.eq(1);
39
39
  });
40
40
 
41
+ it('hasParam', function() {
42
+ const r = this.repository;
43
+ r.setParam('test', 1);
44
+
45
+ const result = r.hasParam('test');
46
+
47
+ expect(result).to.be.true;
48
+ });
49
+
41
50
  it('setParams', function() {
42
51
  const r = this.repository;
43
52
  r.setParams({
@@ -56,6 +65,15 @@ describe('OneBuildRepository', function() {
56
65
  expect(r._baseParams.test).to.be.eq(1);
57
66
  });
58
67
 
68
+ it('hasBaseParam', function() {
69
+ const r = this.repository;
70
+ r.setBaseParam('test', 1);
71
+
72
+ const result = r.hasBaseParam('test');
73
+
74
+ expect(result).to.be.true;
75
+ });
76
+
59
77
  it('setBaseParams', function() {
60
78
  const r = this.repository;
61
79
  r.setBaseParams({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onehat/data",
3
- "version": "1.16.7",
3
+ "version": "1.16.8",
4
4
  "description": "JS data modeling package with adapters for many storage mediums.",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -277,6 +277,22 @@ class AjaxRepository extends Repository {
277
277
  });
278
278
  }
279
279
 
280
+ /**
281
+ * Determines if base query param exists
282
+ * @param {string} name - Param name
283
+ */
284
+ hasBaseParam = (name) => {
285
+ return this._baseParams.hasOwnProperty(name);
286
+ }
287
+
288
+ /**
289
+ * Determines if query param exists
290
+ * @param {string} name - Param name
291
+ */
292
+ hasParam = (name) => {
293
+ return this._params.hasOwnProperty(name);
294
+ }
295
+
280
296
  /**
281
297
  * Sets base query param
282
298
  * @param {string} name - Param name to set.