Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

editorconfig-indent

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

editorconfig-indent

get indent_size and indent_style from .editorconfig file

latest
Source
npmnpm
Version
0.3.0
Version published
Maintainers
1
Created
Source

editorconfig-indent Build Status

get indent_size and indent_style from .editorconfig file

Installation

$ npm install editorconfig-indent

Usage

var fs = require('fs')
var getIndent = require('editorconfig-indent')
var editorconfig = fs.readFileSync('.editorconfig', 'utf-8')

getIndent(editorconfig)

/*
{
    indentSize: {
        all: 4
    },
    indentStyle: {
        all: 'space'
    }
}
*/


/* specify the file extension */
getIndent(editorconfig, ['css', 'scss'])

/*
{
    indentSize: {
        all: 4,
        css: 2,
        scss: null
    },
    indentStyle: {
        all: 'space',
        css: null,
        scss: null
    }
}
*/

License

The MIT License (MIT)

Copyright (c) 2015 Masaaki Morishita

Keywords

editorconfig

FAQs

Package last updated on 31 Dec 2015

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