Socket
Socket
Sign inDemoInstall

@coffeekraken/s-code-formatter

Package Overview
Dependencies
8
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @coffeekraken/s-code-formatter

Base class to be used to create code formatters like the @coffeekraken/s-code-formatter-prettier.


Version published
Maintainers
1
Created

Readme

Source

{{#> layout-readme }}

SBuilder

This package expose a simple SBuilder class that is meant to be extended for each builder you want to create.

For now, this class is the main one used in builders like:

Features

This simple base class gives you some features like:

  • Specify a @coffeekraken/s-interface interface
  • Expose a build method that accepts a params object which reflect your interface
  • Let you define a _build method that will be called with your resolved params object

Usage

Here's a simple example of a custom builder:

import SBuilder from '@coffeekraken/s-builder';
import SPromise from '@coffeekraken/s-promise';
class MyBuilder extends SBuilder {
    constructor(settings = {}) {
        super(settings);
    }
    _build(params, settings) {
        return new SPromise(({ resolve, reject, emit }) => {
            // compilation logic
        });
    }
}

{{/ layout-readme }}

FAQs

Last updated on 10 Aug 2022

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc