Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
let next = this.nextToken;
if (next && next[TOKEN.TYPE] === tokens.space) {
word += this.requiredSpace(this.content(next));
this.position ++;
}
}
nextToken = this.nextToken;
}
const hasClass = indexesOf(word, '.').filter(i => word[i - 1] !== '\\');
let hasId = indexesOf(word, '#').filter(i => word[i - 1] !== '\\');
// Eliminate Sass interpolations from the list of id indexes
const interpolations = indexesOf(word, '#{');
if (interpolations.length) {
hasId = hasId.filter(hashIndex => !~interpolations.indexOf(hashIndex));
}
let indices = sortAsc(uniq([0, ...hasClass, ...hasId]));
indices.forEach((ind, i) => {
const index = indices[i + 1] || word.length;
const value = word.slice(ind, index);
if (i === 0 && firstCallback) {
return firstCallback.call(this, value, indices.length);
}
let node;
const current = this.currToken;
const sourceIndex = current[TOKEN.START_POS] + indices[i];
const source = getSource(
current[1],
current[2] + ind,
current[3],
current[2] + (index - 1)
);
if (~hasClass.indexOf(ind)) {
async function assertFilesCanBeCopied (destPath, filePaths) {
const topLevelFileDirNames = uniq(filePaths
.map((filePath) => filePath.split(path.sep).shift())
)
await Promise.all(
topLevelFileDirNames
.map((fileName) => path.join(destPath, fileName))
.map((filePath) => assertExistsNot(filePath))
)
}
get $typeExtends() {
if (!Array.isArray(this.typeConfig.extends)) return;
return uniq([...this.typeConfig.extends, ...this.typeEnabled]);
}
static getEleList(geojson) {
return uniq(geojson.features.map(feat => feat.properties.ele))
.sort((a, b) => a - b);
}
static addBottomEle(geojson, bottomTiles, eleList) {
const getEleList = (geojson) => {
let mapper = (feature) => { return feature.properties.ele; };
return uniq(geojson.features.map(mapper))
.sort((a,b) => { return a-b; });
};
const addBottomEle = (geojson, bottomTiles, eleList) => {
if (x.search(reg) !== -1) {
trigger.push(db.updates.triggers[x])
}
})
let dep = db.dynamic.inverseDeps[path]
if (dep) {
trigger = trigger.concat(dep)
}
trigger = flatten(trigger)
trigger.push(path)
trigger = uniq(trigger)
return trigger
}