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

eleventy-plugin-debug

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eleventy-plugin-debug

A collection of debugging filters for Eleventy projects.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

eleventy-plugin-debug

INSTALLATION

npm install pdehaan/eleventy-plugin-debug

SETUP

// .eleventy.js
const debug = require("eleventy-plugin-debug");

module.exports = (eleventyConfig) => {
  eleventyConfig.addPlugin(debug);
  return {};
};

This plugin will add the following new global filters which will help with debugging:

  1. inspect — Wrapper for Node's native util.inspect() method.
  2. json — Wrapper for JavaScript's JSON.stringify() method. This filter takes one optional argument which is a string or number value to use for indentation, if you want pretty printed JSON objects.
  3. keys — Wrapper for JavaScript's Object.keys() method. This filter will also sort the returned array of key names for the specified object.

USAGE

Nunjucks

{{ collections.all | inspect }}
{{ page | json }}
{{ page | json(2) }}
{{ page | keys }}

LiquidJS

{{ collections.all | inspect }}
{{ page | json }}
{{ page | json: 2 }}
{{ page | keys }}

11ty.js

${ this.inspect(data.collections.all) }
${ this.json(data.page) }
${ this.json(data.page, 2) }
${ this.keys(data.page) }
${ this.json(this.keys(data.page), 2) }

Keywords

FAQs

Package last updated on 29 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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