PATH:
opt
/
bitninja-dispatcher
/
node_modules
/
class-validator
/
esm5
/
decorator
/
array
{"version":3,"file":"ArrayNotEmpty.js","sourceRoot":"","sources":["../../../../src/decorator/array/ArrayNotEmpty.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,IAAM,eAAe,GAAG,eAAe,CAAC;AAE/C;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,KAAc;IAC1C,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;AAClD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,iBAAqC;IACjE,OAAO,UAAU,CACf;QACE,IAAI,EAAE,eAAe;QACrB,SAAS,EAAE;YACT,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAc,OAAA,aAAa,CAAC,KAAK,CAAC,EAApB,CAAoB;YACxD,cAAc,EAAE,YAAY,CAAC,UAAA,UAAU,IAAI,OAAA,UAAU,GAAG,+BAA+B,EAA5C,CAA4C,EAAE,iBAAiB,CAAC;SAC5G;KACF,EACD,iBAAiB,CAClB,CAAC;AACJ,CAAC","sourcesContent":["import { ValidationOptions } from '../ValidationOptions';\nimport { buildMessage, ValidateBy } from '../common/ValidateBy';\n\nexport const ARRAY_NOT_EMPTY = 'arrayNotEmpty';\n\n/**\n * Checks if given array is not empty.\n * If null or undefined is given then this function returns false.\n */\nexport function arrayNotEmpty(array: unknown): boolean {\n return Array.isArray(array) && array.length > 0;\n}\n\n/**\n * Checks if given array is not empty.\n * If null or undefined is given then this function returns false.\n */\nexport function ArrayNotEmpty(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: ARRAY_NOT_EMPTY,\n validator: {\n validate: (value, args): boolean => arrayNotEmpty(value),\n defaultMessage: buildMessage(eachPrefix => eachPrefix + '$property should not be empty', validationOptions),\n },\n },\n validationOptions\n );\n}\n"]}
[-] ArrayNotEmpty.js
[edit]
[-] ArrayNotContains.js.map
[edit]
[+]
..
[-] ArrayUnique.js.map
[edit]
[-] ArrayNotEmpty.js.map
[edit]
[-] ArrayContains.js
[edit]
[-] ArrayUnique.js
[edit]
[-] ArrayNotContains.js
[edit]
[-] ArrayMaxSize.js
[edit]
[-] ArrayMaxSize.js.map
[edit]
[-] ArrayContains.js.map
[edit]
[-] ArrayMinSize.js.map
[edit]
[-] ArrayMinSize.js
[edit]