Socket
Socket
Sign inDemoInstall

inspect-f

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inspect-f

Cast a function to string and adjust its indentation


Version published
Weekly downloads
2.8K
decreased by-16.78%
Maintainers
1
Weekly downloads
 
Created
Source

inspect-f

NPM Version Dependencies Build Status Code Coverage

Cast a function to string and adjust its indentation. Intended for rendering function bodies in pre-tags or consoles and what have you.

npm install --save inspect-f

Usage

Let's say we have this deeply indented function which uses a 6-space indentation scheme:

          function someDeeplyIndentedFunction(a, b){
                return (
                      a + b
                );
          }

Then the following:

const inspectf = require('inspect-f');
console.log(inspectf(2, someDeeplyIndentedFunction));

Would output:

function someDeeplyIndentedFunction(a, b){
  return (
    a + b
  );
}

Keywords

FAQs

Package last updated on 16 Jan 2018

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