Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

booture

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

booture - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

5

index.js

@@ -44,6 +44,7 @@ (function (global, factory) {

//. type Name = String
//. type Services a = Dict Name a
//. data Bootstrapper a b = Bootstrapper {
//. name :: Name,
//. needs :: Array Name,
//. bootstrap :: Hook (Future Error a) b
//. bootstrap :: Services b -> Hook (Future Error a) b
//. }

@@ -54,3 +55,3 @@ //. ```

//.
//# bootstrap :: Array (Bootstrapper a b) -> Hook (Future Error a) (StrMap b)
//# bootstrap :: Array (Bootstrapper a b) -> Hook (Future Error a) (Services b)
//.

@@ -57,0 +58,0 @@ //. Given a list of service bootstrappers, returns a `Hook` that represents the

2

package.json
{
"name": "booture",
"version": "0.1.0",
"version": "0.1.1",
"description": "Application bootstrapping on top of Fluture Hooks",

@@ -5,0 +5,0 @@ "main": "index",

@@ -78,7 +78,9 @@ # Booture

const withServices = runHook (bootstrap ([ bootstrapConfig,
bootstrapPostgres,
bootstrapRedis,
bootstrapApp ]));
const servicesHook = bootstrap ([ bootstrapConfig,
bootstrapPostgres,
bootstrapRedis,
bootstrapApp ]);
const withServices = runHook (servicesHook);
const program = withServices (({app}) => Future ((rej, res) => {

@@ -93,2 +95,11 @@ const conn = app.listen (3000);

Some things to note about the example above, and general usage of Booture:
1. `servicesHook` is a `Hook`, so before running it, it can be composed
with other hooks using `map`, `ap`, and `chain`, and even used in the
definition of other bootstrappers.
2. `program` is a `Future`, so nothing happens until it's forked. Before
forking it, it can be composed with other Futures using `map`, `ap`,
`bimap`, and `chain`, or any of the other functions provided by Fluture.
## API

@@ -100,6 +111,7 @@

type Name = String
type Services a = Dict Name a
data Bootstrapper a b = Bootstrapper {
name :: Name,
needs :: Array Name,
bootstrap :: Hook (Future Error a) b
bootstrap :: Services b -> Hook (Future Error a) b
}

@@ -110,3 +122,3 @@ ```

#### <a name="bootstrap" href="https://github.com/fluture-js/booture/blob/master/index.mjs#L139">`bootstrap :: Array (Bootstrapper a b) -⁠> Hook (Future Error a) (StrMap b)`</a>
#### <a name="bootstrap" href="https://github.com/fluture-js/booture/blob/master/index.mjs#L151">`bootstrap :: Array (Bootstrapper a b) -⁠> Hook (Future Error a) (Services b)`</a>

@@ -113,0 +125,0 @@ Given a list of service bootstrappers, returns a `Hook` that represents the

Sorry, the diff of this file is not supported yet

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