Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
ImportDeclaration({ node }, { file }) {
const sourceValue = node.source.value;
const extname = path.extname(sourceValue);
const cssIndex = cssSuffixs.indexOf(extname);
// Do not convert `import styles from './foo.css'` kind
if (node.specifiers.length === 0 && cssIndex > -1) {
let cssFileCount = file.get('cssFileCount') || 0;
let cssParamIdentifiers = file.get('cssParamIdentifiers') || [];
const cssFileBaseName = camelcase(path.basename(sourceValue, extname));
const styleSheetIdentifier = t.identifier(`${cssFileBaseName + NAME_SUFFIX}`);
node.specifiers = [t.importDefaultSpecifier(styleSheetIdentifier)];
cssParamIdentifiers.push(styleSheetIdentifier);
cssFileCount++;
file.set('cssParamIdentifiers', cssParamIdentifiers);
file.set('cssFileCount', cssFileCount);
}
}
}
describe('range queries', () => {
const aboveMethod = camelcase('above', name);
const belowMethod = camelcase('below', name);
const betweenMethod = camelcase('between', pluralise(name));
const atMethod = camelcase('at', name);
const atBreakpointMethod = camelcase('at', name, 'Breakpoint');
describe(`${aboveMethod}()`, () => {
runTests(tests.above, name, aboveMethod);
});
describe(`${belowMethod}()`, () => {
runTests(tests.below, name, belowMethod);
});
describe(`${betweenMethod}()`, () => {
runTests(tests.between, name, betweenMethod);
});
describe(`${atMethod}()`, () => {
runTests(tests.at, name, atMethod);
const split = key.split(splitter).filter(Boolean).map(k => camelcase(k));
const splitLen = split.length;
return new Promise((resolve, reject) => {
const camelizedName = camelCase(moduleName);
const API_URL = `https://www.brcdn.org/${moduleName}/latest?standalone=${camelizedName}`;
dispatch(startRequest(API_URL));
var script = document.createElement("script");
script.src = API_URL;
script.onload = () => {
console.log(camelizedName);
if (window[camelizedName]) {
dispatch(successResponse(API_URL));
window[moduleName] = window[camelizedName];
dispatch(addRule(moduleName, window[camelizedName]));
resolve(window[moduleName]);
} else {
const error = new Error(`Not use ${moduleName}`);
dispatch(failureResponse(API_URL, error));
reject(error);
}
const camel = (value) => camelcase(value);
const extractFlagName = flow(flags, extractLongTag, camel);
-d, --out-dir <output dir=""> Set output directory.
--flow Set babel plugin to use, like 'runtime' or
'strip-types' (default).
--help Print this help.
-w, --watch Watch files, recompile on change.
Visit https://github.com/andywer/gear for more information.
`, {
alias: {
d: 'out-dir',
w: 'watch'
}
})
const [ commandName, ...args ] = cli.input
const command = commandName ? commands[ camelcase(commandName.toLowerCase()) ] : null
if (!commandName || cli.flags.help) {
cli.showHelp()
} else if (command) {
command(args, cli.flags, createLogger())
} else {
throw new Error(`Unknown command: ${commandName}`)
}
</output>
return string => {
if (!cache[string]) {
cache[string] = camelCase(string)
}
return cache[string]
}
})()
Object.entries( state ).map( ( [ key ] ) => {
if ( ! reducers[ key ] ) {
const type = `SET_${ key.toUpperCase() }`
const action = camelCase( `set_${ key }` )
actions[ action ] = value => ( { type, value } )
}
} )
.on('data', function(data){
counter++;
if(counter === 1){
for(let prop in data){
if (validUrl.isUri(data[prop].toString()) && contextOptions['skippedColumns'].indexOf(camelCase(prop)) == -1){
if(contextOptions['customMappings'] && contextOptions['customMappings'][camelCase(prop)]){
contextObj[contextOptions['customMappings'][camelCase(prop)]] = {
'@type': '@id'
};
}else{
contextObj['v:' + camelCase(prop)] = {
'@type': '@id'
};
}
}
}
}
let tmpObj = {};
tmpObj['@type'] = contextOptions['entityType'];
for(let prop in data){
if(!prop.trim()){
continue;
import nodeResolve from "rollup-plugin-node-resolve";
import postcss from "rollup-plugin-postcss";
import postcssInlineSvg from "postcss-inline-svg";
import commonjs from "rollup-plugin-commonjs";
import path from "path";
import camelCase from "camelcase";
const PACKAGE_ROOT_PATH = process.cwd();
const PKG_JSON = require(path.join(PACKAGE_ROOT_PATH, "package.json"));
export default {
input: "src/index.js",
output: {
file: "dist/" + PKG_JSON.name + ".js",
format: "iife",
name: camelCase(PKG_JSON.name, { pascalCase: true }),
sourcemap: true,
globals: {
"uniprot-entry-data-adapter": "UniProtEntryDataAdapter",
"protvista-uniprot-entry-adapter": "ProtVistaUniProtEntryAdapter",
d3: "d3",
"protvista-zoomable": "ProtvistaZoomable",
"protvista-track": "ProtvistaTrack",
"resize-observer-polyfill": "ResizeObserver",
litemol: "Litemol"
}
},
external: [
"protvista-zoomable",
"protvista-track",
"protvista-uniprot-entry-adapter",
"d3",