Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sassdoc-extras

Package Overview
Dependencies
Maintainers
4
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sassdoc-extras - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0-rc1

2

package.json
{
"name": "sassdoc-extras",
"description": "SassDoc's Toolbelt",
"version": "1.0.0",
"version": "2.0.0-rc1",
"repository": {

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

@@ -8,3 +8,3 @@ 'use strict';

if (ctx.package && ctx.package.description) {
ctx.package.htmlDescription = marked(ctx.package.description);
ctx.package.description = marked(ctx.package.description);
}

@@ -24,6 +24,6 @@

*/
function applyKey(fn, key, newKey) {
function applyKey(fn, key) {
return function (obj) {
if (key in obj) {
obj[newKey] = fn(obj[key]);
obj[key] = fn(obj[key]);
}

@@ -40,20 +40,20 @@

if ('description' in item) {
item.htmlDescription = marked(item.description);
item.description = marked(item.description);
}
if ('author' in item) {
item.htmlAuthor = item.author.map(md);
item.author = item.author.map(md);
}
if ('throws' in item) {
item.htmlThrows = item.throws.map(md);
if ('throw' in item) {
item.throw = item.throw.map(md);
}
if ('todo' in item) {
item.htmlTodo = item.todo.map(md);
item.todo = item.todo.map(md);
}
if ('returns' in item) {
item.htmlReturns = item.returns.map(
applyKey(md, 'description', 'htmlDescription')
if ('return' in item) {
item.return = item.return.map(
applyKey(md, 'description')
);

@@ -64,15 +64,15 @@ }

item.example = item.example.map(
applyKey(md, 'description', 'htmlDescription')
applyKey(md, 'description')
);
}
if ('parameters' in item) {
item.parameters = item.parameters.map(
applyKey(md, 'description', 'htmlDescription')
if ('parameter' in item) {
item.parameter = item.parameter.map(
applyKey(md, 'description')
);
}
if ('prop' in item) {
item.prop = item.prop.map(
applyKey(md, 'description', 'htmlDescription')
if ('property' in item) {
item.property = item.property.map(
applyKey(md, 'description')
);

@@ -83,3 +83,3 @@ }

item.content = item.content.map(
applyKey(md, 'description', 'htmlDescription')
applyKey(md, 'description')
);

@@ -86,0 +86,0 @@ }

{
"package":{
"description":"Test markdown description.",
"htmlDescription":"<p>Test markdown description.</p>\n"
"description":"<p>Test markdown description.</p>\n"
},

@@ -9,3 +8,3 @@ "data":{

"test-func-markdown":{
"description":"Test: function markdown.\n",
"description":"<p>Test: function markdown.</p>\n",
"context":{

@@ -16,13 +15,12 @@ "type":"function",

"author":[
"Hugo Giraudel"
"<p>Hugo Giraudel</p>\n"
],
"todo":[
"Todo description"
"<p>Todo description</p>\n"
],
"parameters":[
"parameter":[
{
"type":"String",
"name":"one",
"description":"Param one description",
"htmlDescription":"<p>Param one description</p>\n"
"description":"<p>Param one description</p>\n"
},

@@ -32,14 +30,12 @@ {

"name":"two",
"description":"Param two description",
"htmlDescription":"<p>Param two description</p>\n"
"description":"<p>Param two description</p>\n"
}
],
"throws":[
"Throws description"
"throw":[
"<p>Throws description</p>\n"
],
"returns":[
"return":[
{
"type":"*",
"description":"Returns description",
"htmlDescription":"<p>Returns description</p>\n"
"description":"<p>Returns description</p>\n"
}

@@ -49,22 +45,4 @@ ],

{
"description":"This should be parsed as Markdown",
"htmlDescription":"<p>This should be parsed as Markdown</p>\n"
"description":"<p>This should be parsed as Markdown</p>\n"
}
],
"htmlDescription":"<p>Test: function markdown.</p>\n",
"htmlAuthor":[
"<p>Hugo Giraudel</p>\n"
],
"htmlThrows":[
"<p>Throws description</p>\n"
],
"htmlTodo":[
"<p>Todo description</p>\n"
],
"htmlReturns":[
{
"type":"*",
"description":"Returns description",
"htmlDescription":"<p>Returns description</p>\n"
}
]

@@ -71,0 +49,0 @@ }

@@ -19,3 +19,3 @@ {

],
"parameters": [
"parameter": [
{

@@ -32,6 +32,6 @@ "type": "String",

],
"throws": [
"throw": [
"Throws description"
],
"returns": [
"return": [
{

@@ -38,0 +38,0 @@ "type": "*",

@@ -9,3 +9,3 @@ /* global describe, it */

it.only('should result in a flat array', function () {
it('should result in a flat array', function () {
var data = {

@@ -12,0 +12,0 @@ 'function': {

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