How to use the fn function from is
Find comprehensive JavaScript is.fn code examples handpicked from public code repositorys.
162 163 164 165 166 167 168 169 170 171
* * @return {Boolean} */ Kenshoo.prototype.loaded = function(){ return is.fn(window.k_trackevent); }; /** * Track.
770
0
2
170 171 172 173 174 175 176 177 178 179
value = value.value; } else if (Buffer.isBuffer(value)) { value = value.toString('base64'); } else if (is.array(value)) { value = value.map(preEncode); } else if (is.object(value) && is.fn(value.hasOwnProperty)) { for (var prop in value) { if (value.hasOwnProperty(prop)) { value[prop] = preEncode(value[prop]); }
87
0
1
GitHub: zczhangchao51/fjpublish
14 15 16 17 18 19 20 21 22 23
* @param {Boolean} end Whether to stop the process when the warning way, the default is false */ exports.warning = function(msg, local = 'undefined', end = false, cb) { console.log(`${chalk.yellow(prefixTemp('warning'))}[${local}]`, msg) end && process.exit(1) if (cb && is.fn(cb)) return cb(msg) } /** * The error log
10
126
3
+ 27 other calls in file
14 15 16 17 18 19 20 21 22
*/ 'use strict'; var is = require('is'); var isObject = is.object; var isFunction = is.fn; var ErrorMessage = require('../classes/error-message.js'); var hapiRequestInformationExtractor = require('../request-extractors/hapi.js'); var errorHandlerRouter = require('../error-router.js');
558
1
2
+ 3 other calls in file
GitHub: caolan/forms
34 35 36 37 38 39 40 41 42 43
return validator.forceValidation; }); if (!forceValidation && (raw_data === '' || raw_data === null || typeof raw_data === 'undefined')) { // don't validate empty fields, but check if required if (b.required) { var validator = is.fn(b.required) ? b.required : validators.required(); validator(form, b, function (v_err) { b.error = v_err ? String(v_err) : null; callback(v_err, b); });
170
0
29
+ 13 other calls in file
GitHub: TRUEPIC/queryql
55 56 57 58 59 60 61 62 63 64
apply(values, querierMethod = null) { const args = [this.querier.builder, values] this.querier.builder = querierMethod && is.fn(this.querier[querierMethod]) ? this.querier[querierMethod](...args) : this.querier.adapter[this.queryKey](...args) return this.querier.builder
11
103
4
GitHub: GitbookIO/DraftMirror
21 22 23 24 25 26 27 28 29 30
* @return {Boolean} */ WidgetSpec.prototype.isInline = function(node) { var isInline = this.get('inline'); return is.fn(isInline)? isInline(node) : isInline; }; WidgetSpec.prototype.getComponent = function() { return this.get('component');
2
15
3