How to use the string function from is
Find comprehensive JavaScript is.string code examples handpicked from public code repositorys.
221 222 223 224 225 226 227 228 229 230
* }); */ TransactionRequest.prototype.createReadStream = function(table, query) { var self = this; if (is.array(query) || is.string(query)) { query = { keys: query }; }
559
0
2
21 22 23 24 25 26 27 28 29
var maxBy = require('lodash.maxby'); var random = require('lodash.random'); var is = require('is'); var isNumber = is.number; var isObject = is.object; var isString = is.string; var isArray = is.array; var isNull = is.null; var isFunction = is.function;
557
0
3
GitHub: alibaba/beidou
103 104 105 106 107 108 109 110 111 112
set(key, config, force = false) { if (toType(config) !== toType(this.__webpackConfig[key])) { force = true; } if (force || is.string(config)) { this.__webpackConfig[key] = config; } else if (is.object(config)) { this.__webpackConfig[key] = extend( true,
275
0
97
+ 39 other calls in file
GitHub: caolan/forms
132 133 134 135 136 137 138 139 140 141
var iterator = arguments.length > 1 ? arguments[1] : arguments[0]; var name = arguments.length > 1 ? arguments[0] : void 0; return reduce(form.fields, function (html, field, k) { var kname = is.string(name) ? name + '[' + k + ']' : k; return html + field.toHTML(kname, iterator); }, ''); } };
170
0
29
+ 15 other calls in file
39 40 41 42 43 44 45 46 47 48
notifications: [] }; window.clevertap.enablePersonalization = true; window.clevertap.account.push({ id: this.options.clevertap_account_id }); var region = this.options.region; if (region && is.string(region)) { // the hardcoded value actually returns 'in.' intentionally w the period because it is used for the direct integration // and since dealing with mongo is much more painful, we will strip here window.clevertap.region = region.replace('.', ''); }
144
0
0
+ 3 other calls in file
80 81 82 83 84 85 86 87 88 89
throw new Error( `validator must be of type function or string, received ${typeof options.validator}` ); } const validatorName = is.string(options.validator) ? options.validator : ''; const validatorFn = getValidatorFn(options.validator); if (is.undef(validatorFn)) { throw new Error(
47
382
4
+ 4 other calls in file
GitHub: TRUEPIC/queryql
57 58 59 60 61 62 63 64 65 66
let page if (!this.query) { page = this.defaults } else if (is.number(this.query) || is.string(this.query)) { page = this.parseNumber() } else { page = this.parseObject() }
11
103
4
+ 3 other calls in file
GitHub: ali-sdk/ali-mc
12 13 14 15 16 17 18 19 20 21
const OPCODE = constant.opcode; const STATUS = constant.status; function valKey(k) { assert(k && is.string(k) || Buffer.isBuffer(k) && k.length, 'key must be a non-empty string or buffer'); } function valValue(v) { assert(v !== null && v !== undefined && !is.function(v), 'value cannot be null or undefined or function'); }
0
10
12
+ 3 other calls in file
104 105 106 107 108 109 110 111 112 113
throw new Error( `validator must be of type function or string, received ${typeof options.validator}` ) } const validatorName = is.string(options.validator) ? options.validator : '' const validatorFn = getValidatorFn(options.validator) if (is.undef(validatorFn)) { throw new Error(
47
1
7