New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

sassdoc-theme-light

Package Overview
Dependencies
Maintainers
4
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sassdoc-theme-light - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

44

index.js

@@ -24,4 +24,4 @@ 'use strict';

function applyDisplay(ctx) {
function shouldBeDisplayed (item) {
function applyDisplay (ctx) {
var shouldBeDisplayed = function (item) {
var displayItemAccess = ctx.view.display.access.indexOf(item.access[0]) !== -1;

@@ -31,20 +31,40 @@ var isAlias = item.alias;

// TODO: simplify second part of expression
return displayItemAccess && !(isAlias && !displayAlias);
}
var count = 0;
var removeDuplicates = function (array) {
return array.filter(function (elem, pos, self) {
return self.indexOf(elem) == pos;
});
}
var flatten = function (array) {
var merged = [];
return merged.concat.apply(merged, array);
}
var group, type, count = 0;
// Adding a `display` key to each item
for (var group in ctx.data) {
for (var i = 0; i < ctx.data[group].length; i++) {
ctx.data[group][i].display = shouldBeDisplayed(ctx.data[group][i]);
ctx.data.groups = removeDuplicates(flatten(ctx.data.groups));
if (ctx.data[group][i].display === true) {
count++;
}
// For each group
ctx.data.groups.forEach(function (g) {
group = ctx.data.byGroupAndType[g];
// For each type in group
for (type in group) {
// For each item in type
group[type].forEach(function (item) {
item.display = shouldBeDisplayed(item);
if (item.display === true) {
count++;
}
});
}
}
});
ctx.dataCount = count;
ctx.data.count = count;
}

@@ -51,0 +71,0 @@

{
"name": "sassdoc-theme-light",
"version": "0.3.1",
"version": "0.3.2",
"repository": {

@@ -5,0 +5,0 @@ "type": "git",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc