it('exclude keys (sdk query)', async (done) => { const obj = new TestObject({ foo: 'baz', hello: 'world' }); await obj.save(); const query = new Parse.Query('TestObject'); query.exclude('foo'); const object = await query.get(obj.id); expect(object.get('foo')).toBeUndefined(); expect(object.get('hello')).toBe('world'); done(); });
export function headers(headers, config, req) { const normalizedHeaders = new HTTPHeaders(headers); if (isFunction(config)) { return config(normalizedHeaders, req); } if (isObjectLike(config) && isArray(config.exclude)) { config.exclude.forEach(header => delete normalizedHeaders[header]); } return normalizedHeaders; }
it('should use the modified exclude query', async () => { Parse.Cloud.beforeFind('MyObject', req => { const q = req.query; q.exclude('number'); }); const obj = new Parse.Object('MyObject'); obj.set('number', 100); obj.set('string', 'hello'); await obj.save(); const query = new Parse.Query('MyObject'); query.equalTo('objectId', obj.id); const results = await query.find(); expect(results.length).toBe(1); expect(results[0].get('number')).toBeUndefined(); expect(results[0].get('string')).toBe('hello'); });
const StreamView = function StreamView(options) { BaseView.call(this, options); assert(options.logProvider, "StreamView requires logProvider"); if (this.layoutConfig.exclude) { this.excludeRegex = new RegExp(this.layoutConfig.exclude); } if (this.layoutConfig.include) { this.includeRegex = new RegExp(this.layoutConfig.include); } this.logProvider = options.logProvider; this._createView(options); const content = options.logProvider.getLog(this.layoutConfig.streams, options.scrollback); if (content.length > 0) { this.log(content); } this._boundLog = this.log.bind(this); _.each(this.layoutConfig.streams, (eventName) => { this.logProvider.on(eventName, this._boundLog); }); }
function ignoreRules(rules, ignore, isResRules) { var result = resolveIgnore(ignore); var ignoreAll = result.ignoreAll; var exclude = result.exclude; ignore = result.ignore; var keys = Object.keys(ignoreAll ? rules : ignore); keys.forEach(function(name) { if (name === 'filter' || name === 'ignore' || exclude[name]) { return; } if (!isResRules || protoMgr.resProtocols.indexOf(name) !== -1) { if (ignorePlugins(rules, name, exclude) || ignoreProxy(rules, name, exclude) || ignoreForwardRule(rules, name, exclude)) { return; } delete rules[name]; } }); }
function resolveFilter(ignore, filter) { filter = filter || {}; var result = resolveIgnore(ignore); ignore = result.ignore; Object.keys(ignore).forEach(function(name) { if (protocols.indexOf(name) === -1) { filter['ignore|' + name] = true; } else { filter[name] = true; } }); Object.keys(result.exclude).forEach(function(name) { filter['ignore:' + name] = 1; }); if (result.ignoreAll) { filter.allRules = 1; } return filter; }
function shouldCacheResponse(request, response, toggle) { var opt = globalOptions var codes = opt.statusCodes if (!response) return false if (toggle && !toggle(request, response)) { return false } if ( codes.exclude && codes.exclude.length && codes.exclude.indexOf(response.statusCode) !== -1 ) return false if ( codes.include && codes.include.length && codes.include.indexOf(response.statusCode) === -1 ) return false return true }
.exclude .add(filepath => { if (/\.vue\.js$/.test(filepath)) {
query.ascending('key'); query.select('select'); query.exclude('exclude'); query.readPreference('PRIMARY', 'SECONDARY', 'SECONDARY_PREFERRED'); query.find().then(() => {
})} placeholder={this.props.intl.formatMessage(MESSAGES.regEx)} defaultValue={rule.exclude} width="three-eighths" />
test("crawl but exclude node_modules dir", async () => { const api = new fdir() .withBasePath() .exclude((dir) => dir.includes("node_modules")) .crawl("./"); const files = await api[type](); expect(files.every((file) => !file.includes("node_modules"))).toBe(true); });
export function headers(headers, config, req) { const normalizedHeaders = new HTTPHeaders(headers); if (isFunction(config)) { return config(normalizedHeaders, req); } if (isObjectLike(config) && isArray(config.exclude)) { config.exclude.forEach(header => delete normalizedHeaders[header]); } return normalizedHeaders; }
.exclude .add(filepath => { if (/\.vue\.js$/.test(filepath)) {