1.5.0 • Published 5 years ago

@mhirba/shenron-capsule v1.5.0

Weekly downloads
15
License
MIT
Repository
-
Last release
5 years ago

Summary

Overview

Simple package used internally at mhirba for simple utilities such as log, command line arguments parsing, etc.

Je suis adroit de la main gauche et je suis gauche de la main droite _ Raymond Devos

Installation

Use Yarn or NPM to install.

❯ yarn add @mhirba/shenron-capsule

or

❯ npm install @mhirba/shenron-capsule

Usage

Simple. Basic.

A tiny library with vanilla individual export functions:

log

Display output depending several options like colors, timestamps and newLine.

import { log, LogLevel } from '@mhirba/shenron-capsule'

log('Hello, World', { how: LogLevel.INFO, withTimestamps: true })
❯ ts-node ./main.ts
2019-10-29T21:55:40+01:00 :: Hello, World

There is also some alias logError, logWarn, logWithSteps, etc.

Scraping

Some usefull function to use specific puppeteer action with ease

download

Fetch and save a file from a web link

import { download } from '@mhirba/shenron-capsule'

await download('https://mhirba.com/nindo.pdf', './philosophy/mhirba-nindo.pdf')
❯ ts-node ./main.ts
File `mhirba-nindo.pdf` successfully saved in directory `./philosophy` !

Credits

Craft with :heart: by Mhirba in Paris.

1.5.0

5 years ago

1.4.3

5 years ago

1.4.2

5 years ago

1.4.1

5 years ago

1.4.0

5 years ago

1.3.2

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago