Socket
Socket
Sign inDemoInstall

codedent

Package Overview
Dependencies
1
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

codedent

A dedent alternative for just code


Version published
Weekly downloads
6.4K
decreased by-1.01%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

codedent

build status Coverage Status

Usable both as template literal tag or just as callback for strings, removes all spaces found at the very first line of code encountered while sanitizing, keeping everything else around.

import dedent from 'codedent';

dedent`
  def this_is_fine():
    return "fine"
`;

/**
def this_is_fine():
  return "fine"
*/

Differently from dedent module, this one doesn't care about code starting in one line then indented in others ... it's just code as you pass it along, no magic involved.

Keywords

FAQs

Package last updated on 06 Sep 2023

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc