@dvrd/dvr-controls 1.0.35 → 1.0.36

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dvrd/dvr-controls",
3
- "version": "1.0.35",
3
+ "version": "1.0.36",
4
4
  "description": "Custom web controls",
5
5
  "main": "index.ts",
6
6
  "files": [
@@ -136,7 +136,11 @@ export const shuffleArray = (arr: any[]): any[] => {
136
136
  return arr;
137
137
  };
138
138
 
139
- export const nullify = <T extends string | Array<any> | Set<any>>(value?: T | null): T | null => {
139
+ export function nullify<T extends string | Array<any> | Set<any> | number>(value?: T | null): T | null {
140
+ if (typeof value === 'number') {
141
+ if (value > 0) return value;
142
+ return null;
143
+ }
140
144
  if (!value) return null;
141
145
  else if (Array.isArray(value) || typeof value === 'string')
142
146
  return value.length ? value : null;