@dereekb/model 12.5.7 → 12.5.9

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/index.cjs.js CHANGED
@@ -2545,22 +2545,7 @@ function basicSyncEntityCommonTypeSynchronizerInstanceFactory(config) {
2545
2545
 
2546
2546
  // MARK: String
2547
2547
  function transformStringToBoolean(defaultValue) {
2548
- return params => {
2549
- if (params.value) {
2550
- switch (params.value.toLowerCase()) {
2551
- case 't':
2552
- case 'true':
2553
- return true;
2554
- case 'f':
2555
- case 'false':
2556
- return false;
2557
- default:
2558
- return defaultValue;
2559
- }
2560
- } else {
2561
- return defaultValue;
2562
- }
2563
- };
2548
+ return params => util.stringToBoolean(params.value, defaultValue);
2564
2549
  }
2565
2550
  // MARK: Comma Separated Values
2566
2551
  function transformCommaSeparatedValueToArray(mapFn) {
package/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ZIP_CODE_STRING_REGEX, US_STATE_CODE_STRING_REGEX, splitJoinRemainder, filterFalsyAndEmptyValues, isolateWebsitePathFunction, toRelativeSlashPathStartType, addPrefix, hasWebsiteDomain, toAbsoluteSlashPathStartType, removeHttpFromUrl, forEachKeyValue, iterableToArray, arrayToObject, MAP_IDENTITY, makeValuesGroupMap, cachedGetter, filterMaybeArrayValues, sortByNumberFunction, performAsyncTasks, pushArrayItemsIntoArray, splitCommaSeparatedString, mapPromiseOrValue, isISO8601DayString, isMinuteOfDay, isE164PhoneNumber, isE164PhoneNumberWithExtension, isUniqueKeyedFunction, isWebsiteUrl, isWebsiteUrlWithPrefix } from '@dereekb/util';
1
+ import { ZIP_CODE_STRING_REGEX, US_STATE_CODE_STRING_REGEX, splitJoinRemainder, filterFalsyAndEmptyValues, isolateWebsitePathFunction, toRelativeSlashPathStartType, addPrefix, hasWebsiteDomain, toAbsoluteSlashPathStartType, removeHttpFromUrl, forEachKeyValue, iterableToArray, arrayToObject, MAP_IDENTITY, makeValuesGroupMap, cachedGetter, filterMaybeArrayValues, sortByNumberFunction, performAsyncTasks, pushArrayItemsIntoArray, stringToBoolean, splitCommaSeparatedString, mapPromiseOrValue, isISO8601DayString, isMinuteOfDay, isE164PhoneNumber, isE164PhoneNumberWithExtension, isUniqueKeyedFunction, isWebsiteUrl, isWebsiteUrlWithPrefix } from '@dereekb/util';
2
2
  import { Expose, Transform, plainToInstance } from 'class-transformer';
3
3
  import { IsString, IsNotEmpty, MaxLength, IsOptional, Matches, MinLength, validate, registerDecorator, buildMessage } from 'class-validator';
4
4
 
@@ -2543,22 +2543,7 @@ function basicSyncEntityCommonTypeSynchronizerInstanceFactory(config) {
2543
2543
 
2544
2544
  // MARK: String
2545
2545
  function transformStringToBoolean(defaultValue) {
2546
- return params => {
2547
- if (params.value) {
2548
- switch (params.value.toLowerCase()) {
2549
- case 't':
2550
- case 'true':
2551
- return true;
2552
- case 'f':
2553
- case 'false':
2554
- return false;
2555
- default:
2556
- return defaultValue;
2557
- }
2558
- } else {
2559
- return defaultValue;
2560
- }
2561
- };
2546
+ return params => stringToBoolean(params.value, defaultValue);
2562
2547
  }
2563
2548
  // MARK: Comma Separated Values
2564
2549
  function transformCommaSeparatedValueToArray(mapFn) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/model",
3
- "version": "12.5.7",
3
+ "version": "12.5.9",
4
4
  "exports": {
5
5
  ".": {
6
6
  "types": "./src/index.d.ts",