Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}).then(json => {
forEach(
compose(
url => {
if (url !== '') fetchImage(url);
},
tap(console.log.bind(console)),
propOr('', 'thumburl'),
head,
propOr([], 'imageinfo'),
),
values(json.query.pages),
);
// Recursively paginate through results until complete.
if (json.continue != null && json.continue.gaicontinue != null) {
scrapeImages(thumbnailSize, json.continue.gaicontinue);
}
});
}
id?: string
name: string
version: string
}
const NPMPackage = {
id: ({ id, name }: INPMPackage): string => {
if (!id && !name) {
throw new Error('NPMPackage::id must resolve to a valid value.')
}
return id || name
},
dependencies: pipe(
propOr({}, 'dependencies'),
// @ts-ignore
toPairs,
map(zipObj(['name', 'version']))
),
}
const NPMDependency = {
id: ({ name, version }: INPMPackage) => {
if (!name) {
throw new Error('NPMDependency::id must have a name available.')
}
if (!version) {
throw new Error('NPMDependency::id must have a version available.')
}
import * as R from 'ramda';
import { SVG_INHERITED_PROPS } from '../constants';
const getInheritProps = R.compose(
R.pick(SVG_INHERITED_PROPS),
R.propOr({}, 'props'),
);
const inheritProps = node => {
const props = getInheritProps(node);
return R.evolve({
children: R.map(
R.compose(
inheritProps,
R.evolve({
props: R.merge(props),
}),
),
),
})(node);
};
export default function NetworkView(props) {
const { network={}, networkProtocol, onToggleEnabled, onEdit } = props;
const { id='no-id', name, securityData } = network;
const authorizied = propOr(false, 'authorized', securityData);
const message = propOr('', 'message', securityData);
const enabled = propOr(false, 'enabled', securityData);
const { networkProtocolName } = propOr('', 'name', networkProtocol);
const ConnectedTooltip = authorizied ? IsConnectedTooltip : IsNotConnectedTooltip;
const statusGlyph = authorizied ?
'glyphicon-transfer text-success' : 'glyphicon-exclamation-sign text-danger';
return (
<div>
<div>{name}</div>
{ !isEmpty(network) && }
<div data-for="{`enabled-xbox-${id}`}" data-tip="">
<input checked="{enabled}" type="checkbox">
Enabled
</div></div>
constructor(props) {
super(props);
const params = buildViewParamsFromUrlAndStorage(
props.history,
props.location,
'Regions-view',
);
this.state = {
sortBy: propOr('name', 'sortBy', params),
orderAsc: propOr(true, 'orderAsc', params),
searchTerm: propOr('', 'searchTerm', params),
view: propOr('lines', 'view', params),
};
}
constructor(props) {
super(props);
const params = buildViewParamsFromUrlAndStorage(
props.history,
props.location,
'Sectors-view',
);
this.state = {
searchTerm: propOr('', 'searchTerm', params),
};
}
getm("runs")
)
export const hasPassingExamGrade = R.compose(
R.any(R.propEq("passed", true)),
R.propOr([], "proctorate_exams_grades")
)
export const hasFailingExamGrade = R.compose(
R.any(R.propEq("passed", false)),
R.propOr([], "proctorate_exams_grades")
)
export const hasPassedCourseRun = R.compose(
R.any(R.propEq("status", STATUS_PASSED)),
R.propOr([], "runs")
)
export const passedCourse = (course: Course): boolean => {
return course.has_exam
? hasPassedCourseRun(course) && hasPassingExamGrade(course)
: hasPassedCourseRun(course)
}
constructor(props) {
super(props);
const params = buildViewParamsFromUrlAndStorage(
props.history,
props.location,
'AttackPatterns-view',
);
this.state = {
sortBy: propOr('name', 'sortBy', params),
orderAsc: propOr(true, 'orderAsc', params),
searchTerm: propOr('', 'searchTerm', params),
view: propOr('lines', 'view', params),
filters: {},
};
}
constructor(props) {
super(props);
const params = buildViewParamsFromUrlAndStorage(
props.history,
props.location,
'Tags-view',
);
this.state = {
sortBy: propOr('value', 'sortBy', params),
orderAsc: propOr(true, 'orderAsc', params),
searchTerm: propOr('', 'searchTerm', params),
view: propOr('lines', 'view', params),
};
}