Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var result = undefined;
jp.apply(d, path, function(value) {
if (util.isUndefined(result)) {
result = value;
} else {
if (!util.isArray(result)) {
result = [result]
}
result.push(value)
}
return value
})
return result
}
if (util.isUndefined(command.settings) || util.isUndefined(command.settings.path) || command.settings.path == "" || command.settings.path == "$") {
// state.head = {
// data: state.head.data,
// type: command.settings.as || "json"
// }
// if (util.isFunction(state.head.data)) state.head.type = 'function'
return state;
}
// if (command.settings.path.indexOf("_")==0){
// var res = state.storage._[command.settings.path.substring(2,command.settings.path.length)];
// state.head={
// data: res,
// type: typeof res
// }
// }else{
state.head = {
function Socket(options) {
if (!(this instanceof Socket)) return new Socket(options);
this._connecting = false;
this._hadError = false;
this._handle = null;
this._parent = null;
this._host = null;
if (util.isNumber(options))
options = { fd: options }; // Legacy interface.
else if (util.isUndefined(options))
options = {};
stream.Duplex.call(this, options);
if (options.handle) {
this._handle = options.handle; // private
} else if (!util.isUndefined(options.fd)) {
this._handle = createHandle(options.fd);
this._handle.open(options.fd);
// this._handle.open() puts the file descriptor in non-blocking
// mode but it must be synchronous for backwards compatibility.
if ((options.fd == 1 || options.fd == 2) && this._handle instanceof Pipe) {
// Make stdout and stderr blocking on Windows
var err = this._handle.setBlocking(true);
if (err)
throw errnoException(err, 'setBlocking');
if (type === 'error') {
if (!this._events.error ||
(util.isObject(this._events.error) && !this._events.error.length)) {
er = arguments[1];
if (er instanceof Error) {
throw er; // Unhandled 'error' event
} else {
throw TypeError('Uncaught, unspecified "error" event.');
}
return false;
}
}
handler = this._events[type];
if (util.isUndefined(handler))
return false;
if (util.isFunction(handler)) {
switch (arguments.length) {
// fast cases
case 1:
handler.call(this);
break;
case 2:
handler.call(this, arguments[1]);
break;
case 3:
handler.call(this, arguments[1], arguments[2]);
break;
// slower
default:
private _getMetadataParams(): any {
const params = {
page: this.page.page,
size: this.page.size,
sort: this.selectedSort.value,
pseudoParam : (new Date()).getTime()
};
// 검색어
if (!isUndefined(this.listSearchText) && this.listSearchText.trim() !== '') {
params['nameContains'] = this.listSearchText.trim();
}
// 데이터타입
if (!isUndefined(this.sourceType) && this.sourceType.trim() !== '') {
params['sourceType'] = this.sourceType.trim();
}
// 태그
if (!isUndefined(this.tag) && this.tag.trim() !== '') {
params['tag'] = this.tag.trim();
}
return params;
}
private _getCodeTableListParams(): object {
const params = {
size: this.pageResult.size,
page: this.pageResult.number,
sort: this.selectedContentSort.key + ',' + this.selectedContentSort.sort
};
// 검색어
if (!isUndefined(this.searchText) && this.searchText.trim() !== '') {
params['nameContains'] = this.searchText.trim();
}
// date
if (this._selectedDate && this._selectedDate.type !== 'ALL') {
params['searchDateBy'] = 'CREATED';
if (this._selectedDate.startDateStr) {
params['from'] = moment(this._selectedDate.startDateStr).format('YYYY-MM-DDTHH:mm:ss.SSSZ');
}
if (this._selectedDate.endDateStr) {
params['to'] = moment(this._selectedDate.endDateStr).format('YYYY-MM-DDTHH:mm:ss.SSSZ');
}
}
return params;
}
}
function emitKeys(stream, s) {
if (util.isBuffer(s)) {
if (s[0] > 127 && util.isUndefined(s[1])) {
s[0] -= 128;
s = '\x1b' + s.toString(stream.encoding || 'utf-8');
} else {
s = s.toString(stream.encoding || 'utf-8');
}
}
var buffer = [];
var match;
while (match = escapeCodeReAnywhere.exec(s)) {
buffer = buffer.concat(s.slice(0, match.index).split(''));
buffer.push(match[0]);
s = s.slice(match.index + match[0].length);
}
buffer = buffer.concat(s.split(''));
throw new Error(writeMsg);
else if (process.traceDeprecation)
console.trace(writeMsg);
else
console.error(writeMsg);
writeWarned = true;
}
var swap = encoding;
encoding = offset;
offset = length >>> 0;
length = swap;
}
var remaining = this.length - offset;
if (util.isUndefined(length) || length > remaining)
length = remaining;
encoding = !!encoding ? (encoding + '').toLowerCase() : 'utf8';
if (string.length > 0 && (length < 0 || offset < 0))
throw new RangeError('attempt to write outside buffer bounds');
var ret;
switch (encoding) {
case 'hex':
ret = this.hexWrite(string, offset, length);
break;
case 'utf8':
case 'utf-8':
ret = this.utf8Write(string, offset, length);
familyNodes.forEach((n: Node) => {
const familyPos = this.getFamilyPos(n);
if (!isUndefined(familyPos)) {
couplesData.push(familyPos);
}
});
regularString(schema, joischema) {
schema.pattern && (joischema = joischema.regex(new RegExp(schema.pattern)));
if (Util.isUndefined(schema.minLength)) {
schema.minLength = 0;
}
if (schema.minLength === 0) {
joischema = joischema.allow('');
}
Util.isNumber(schema.minLength) && (joischema = joischema.min(schema.minLength));
Util.isNumber(schema.maxLength) && (joischema = joischema.max(schema.maxLength));
return joischema;
}
jp.apply(d, path, function(value) {
if (util.isUndefined(result)) {
result = value;
} else {
if (!util.isArray(result)) {
result = [result]
}
result.push(value)
}
return value
})
return result