Coder Social home page Coder Social logo

savagecore / node-apache2-conf-formatter Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 1.31 MB

A javascript port of https://github.com/bearx3f/a2conf - basic formatting

Home Page: https://www.npmjs.com/package/apache2-conf-formatter

License: MIT License

JavaScript 98.28% Shell 1.72%

node-apache2-conf-formatter's Introduction

apache2-conf-formatter Build Status

Codecov

Format apache2 configuration files

Install

$ npm install apache2-conf-formatter

Usage

const apache2ConfFormatter = require('apache2-conf-formatter');

console.log(apache2ConfFormatter.format('httpd.conf'));
//=> Promise <String> the formatted configuration file

API

format(path, [options])

Format the given file

arguments: path the path to file. options (optional) Object see options

returns: Promise <String> the formatted configuration file

options

useTabs

Type: boolean

Default: false

Indent lines with tabs instead of spaces

tabWidth

Type: number

Default: 2

Specify the number of spaces/tabs per indentation-level

License

MIT © SavageCore

node-apache2-conf-formatter's People

Contributors

savagecore avatar dependabot-support avatar dependabot[bot] avatar dependabot-preview[bot] avatar

Watchers

 avatar James Cloos avatar  avatar

node-apache2-conf-formatter's Issues

Enhancement for README : string vs Promise<String>

For anyone who wants the actual result and not just the Promise :

const apache2ConfFormatter = require('apache2-conf-formatter');

apache2ConfFormatter.format('httpd.conf').then(function (final_result) {
    console.log(final_result);
});

Sure, with a promise we can do anything we want. But the README shows console.log() for the promise, which is rather useless. If there is any mention at all of console.log() then it would probably be preferable to show the final result ... and then leave it to the user/developer's imagination about what else can be done with the data.

TY

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.