Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
({ task }) => _.includes(task, 'yarn') || _.includes(task, 'npm')
),
export function getCurrentSection( currentSection, isNotesOpen, currentRoute ) {
if ( isNotesOpen ) {
return NOTES;
}
if ( currentRoute && currentRoute.indexOf( '/stats/activity/' ) !== -1 ) {
//don't show app banner in activity log
return null;
}
if ( includes( ALLOWED_SECTIONS, currentSection ) ) {
return currentSection;
}
return null;
}
validator (value) {
return includes(['inline', 'popup'], value)
}
},
import path from 'path';
import pkgDir from 'pkg-dir';
import { createWebpackConfig } from '@reactant/cli/webpack';
import { rebuildConfig } from '@reactant/cli/config';
const rootPath = pkgDir.sync(process.cwd());
const mergeConfiguration = require(require.resolve('merge-configuration', {
paths: [
path.resolve(
pkgDir.sync(process.cwd()),
'node_modules/@reactant/web-isomorphic'
)
]
})).default;
let debug = false;
if (_.includes(process.argv, '--verbose')) setLevel('verbose');
if (_.includes(process.argv, '--debug')) {
setLevel('debug');
debug = true;
}
module.exports = webpackConfig => {
const { config, platform } = rebuildConfig({
options: { platform: 'web', debug }
});
const { paths, babel, options } = config;
webpackConfig = createWebpackConfig(config, { platform, webpackConfig });
webpackConfig.resolve.extensions.unshift('.web.js');
webpackConfig.externals = {
...webpackConfig.externals,
child_process: {},
deasync: {},
return _.reduce(data, (accum, v, k) => {
const toMerge = (_.includes(segments, k))
? { segments: { [k]: v } }
: { queryStrings: mapQueryStrings(queryStrings, k, v) };
return _.merge(accum, toMerge);
}, {segments: {}, queryStrings: {} })
}
var objectTypeToMethod = function(objectType) {
if (!objectType) {
return "object";
} else if (_.has(objectVocabMap, objectType)) {
return objectVocabMap[objectType];
} else if (_.includes(ActivityObject.objectTypes, objectType) &&
_.has(as, objectType)) {
return objectType;
} else {
return "object";
}
};
function getAllFilterValues(data, column) {
var seen = [];
for (var i = 0; i < data.length; i++) {
var item = data[i];
if (item.hasOwnProperty('__group') || item.hasOwnProperty('__groupTotals')) {
continue;
}
var value = item[column.field];
if (!_.includes(seen, value)) {
seen.push(value);
}
}
return _.sortBy(seen, function(v) {
return v;
});
}
if (splited.length !== 3) {
throw new Error('Malformed Global Identifier');
}
if (!_.includes(validPrefixes, splited[0])) {
throw new Error('Invalid Global Identifier Prefix');
}
switch (splited[0]) {
case 'claim':
if (!_.includes(validUCAIdentifiers, splited[1]) && !_.includes(validClaimIdentifiers, identifier)) {
throw new Error(`${identifier} is not valid`);
}
return true;
case 'credential':
if (!_.includes(validVCIdentifiers, splited[1]) && !_.includes(validVCIdentifiers, identifier)) {
throw new Error(`${identifier} is not valid`);
}
return true;
default:
return false;
}
}
({ rowIndex, data }) => {
return (
);
}
}
sort={false}/>
constructor(desiredLanguage?: Language) {
if (desiredLanguage !== undefined) {
this.setLanguage(desiredLanguage);
return;
}
const browserLanguage = (window.navigator as any).userLanguage || window.navigator.language || 'en-US';
let language = Language.English;
if (_.includes(browserLanguage, 'es-')) {
language = Language.Spanish;
} else if (_.includes(browserLanguage, 'zh-')) {
language = Language.Chinese;
} else if (_.includes(browserLanguage, 'ko-')) {
language = Language.Korean;
} else if (_.includes(browserLanguage, 'ru-')) {
language = Language.Russian;
}
this.setLanguage(language);
}
public getLanguage(): Language {