@bluedot-innovation/models 5.1.17-alpha.2 → 5.1.17

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.
@@ -85,16 +85,6 @@ describe('Zone', () => {
85
85
  done()
86
86
  })
87
87
  })
88
-
89
- it('should set tags to lowercase and remove the duplicated tag', (done) => {
90
- zone.tags = ["TAG", "TaG"]
91
-
92
- let Zone = new ZoneModel(zone)
93
- assert.exists(Zone._doc)
94
- assert.exists(Zone._doc.tags)
95
- assert.strictEqual(Zone._doc.tags[0], "tag")
96
- done()
97
- })
98
88
  })
99
89
 
100
90
  describe('Invalid Zone ', () => {
package/models/Zone.js CHANGED
@@ -37,10 +37,6 @@ let customDataValidators = [
37
37
  {validator: helpers.isValidCustomDataCount, msg: 'Only 5 custom data fields are allowed to be added per zone'}
38
38
  ];
39
39
 
40
- const tagsFormation = (tags) => {
41
- return [...new Set(tags.map(tag => typeof tag === 'string' ? tag.toLowerCase(): tag))]
42
- }
43
-
44
40
  let actionSchema = new Schema({},
45
41
  { discriminatorKey: 'type', _id: false })
46
42
 
@@ -63,7 +59,7 @@ let zoneSchema = new Schema({
63
59
  message: '{VALUE} is not a number'
64
60
  }
65
61
  },
66
- tags: {type: [String], set : tagsFormation, validate: helpers.validateNotNull},
62
+ tags: {type: [String], validate: helpers.validateNotNull},
67
63
  conditions: {
68
64
  type: [conditionSchema]
69
65
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bluedot-innovation/models",
3
- "version": "5.1.17-alpha.2",
3
+ "version": "5.1.17",
4
4
  "main": "Models.js",
5
5
  "scripts": {
6
6
  "lint": "./node_modules/.bin/eslint -c .eslintrc.js ./models/*.js ./__tests__/**/*.js ./__tests__/**/**/*.js ./schemas/*.js",