dtable-utils
Advanced tools
Comparing version 4.3.4 to 4.3.5
@@ -0,1 +1,2 @@ | ||
import _typeof from '@babel/runtime/helpers/typeof'; | ||
import { FILTER_PREDICATE_TYPE } from '../../constants/filter/filter-predicate.js'; | ||
@@ -5,9 +6,16 @@ | ||
* Filter long-text | ||
* @param {object} longText e.g. { text, ... } | ||
* @param {any} value | ||
* @param {string} filter_predicate | ||
* @returns bool | ||
*/ | ||
var longTextFilter = function longTextFilter(longText, _ref) { | ||
var longTextFilter = function longTextFilter(value, _ref) { | ||
var filter_predicate = _ref.filter_predicate; | ||
var text = longText ? longText.text : null; | ||
var text; | ||
if (typeof value === 'string') { | ||
text = value.trim(); | ||
} else if (_typeof(value) === 'object') { | ||
text = value ? value.text.trim() : null; | ||
} else { | ||
text = null; | ||
} | ||
switch (filter_predicate) { | ||
@@ -14,0 +22,0 @@ case FILTER_PREDICATE_TYPE.EMPTY: |
@@ -5,13 +5,25 @@ 'use strict'; | ||
var _typeof = require('@babel/runtime/helpers/typeof'); | ||
var filterPredicate = require('../../constants/filter/filter-predicate.js'); | ||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
var _typeof__default = /*#__PURE__*/_interopDefaultLegacy(_typeof); | ||
/** | ||
* Filter long-text | ||
* @param {object} longText e.g. { text, ... } | ||
* @param {any} value | ||
* @param {string} filter_predicate | ||
* @returns bool | ||
*/ | ||
var longTextFilter = function longTextFilter(longText, _ref) { | ||
var longTextFilter = function longTextFilter(value, _ref) { | ||
var filter_predicate = _ref.filter_predicate; | ||
var text = longText ? longText.text : null; | ||
var text; | ||
if (typeof value === 'string') { | ||
text = value.trim(); | ||
} else if (_typeof__default["default"](value) === 'object') { | ||
text = value ? value.text.trim() : null; | ||
} else { | ||
text = null; | ||
} | ||
switch (filter_predicate) { | ||
@@ -18,0 +30,0 @@ case filterPredicate.FILTER_PREDICATE_TYPE.EMPTY: |
{ | ||
"name": "dtable-utils", | ||
"version": "4.3.4", | ||
"version": "4.3.5", | ||
"description": "dtable common utils", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
757037
16580