@dynamatix/gb-schemas 1.2.130 → 1.2.131

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.
@@ -17,7 +17,7 @@ class SortCode extends mongoose.SchemaType {
17
17
  if (cleaned.length !== 6) {
18
18
  throw new mongoose.Error.CastError('SortCode', val, this.path, new Error(`${val} is not a valid UK sort code. Must contain exactly 6 digits.`));
19
19
  }
20
- return `${cleaned.slice(0, 2)}-${cleaned.slice(2, 4)}-${cleaned.slice(4, 6)}`;
20
+ return Number(cleaned);
21
21
  }
22
22
  }
23
23
  // Register the custom type globally with Mongoose
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamatix/gb-schemas",
3
- "version": "1.2.130",
3
+ "version": "1.2.131",
4
4
  "description": "All the schemas for gatehouse bank back-end",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",