https://github.com/artdecocode/medium-demo
Hello World.
https://github.com/artdecocode/medium-demo
test
Last synced: 6 months ago
JSON representation
Hello World.
- Host: GitHub
- URL: https://github.com/artdecocode/medium-demo
- Owner: artdecocode
- License: agpl-3.0
- Created: 2020-01-11T00:02:17.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-11T00:02:36.000Z (about 6 years ago)
- Last Synced: 2025-02-25T15:52:02.740Z (11 months ago)
- Topics: test
- Language: JavaScript
- Size: 55.7 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# @artdeco/medium-demo
[](https://www.npmjs.com/package/@artdeco/medium-demo)
`@artdeco/medium-demo` is Hello World.
```sh
yarn add @artdeco/medium-demo
```
## Table Of Contents
- [Table Of Contents](#table-of-contents)
- [API](#api)
- [`async mediumDemo(config: !Config): string`](#async-mynewpackageconfig-config-string)
* [`Config`](#type-config)
- [CLI](#cli)
- [Copyright & License](#copyright--license)
## API
The package is available by importing its default function:
```js
import mediumDemo from '@artdeco/medium-demo'
```
## async mediumDemo(
`config: !Config,`
): string
Hello World.
- config* !Config: The config.
__`Config`__: Options for the program.
| Name | Type | Description | Default |
| --------- | ---------------- | ----------------- | ------- |
| shouldRun | boolean | A boolean option. | `true` |
| text | string | A text to return. | - |
```js
import mediumDemo from '@artdeco/medium-demo'
(async () => {
const res = await mediumDemo({
text: 'example',
})
console.log(res)
})()
```
```
@artdeco/medium-demo called with example
example
```
## CLI
The package can also be used from the CLI.
Argument
Short
Description
input
The path to the input file.
--output
-o
Where to save the output. By default prints to stdout. Default -.
--init
-i
Initialise in the current folder.
--help
-h
Print the help information and exit.
--version
-v
Show the version's number and exit.
```
Hello World.
medium-demo input [-o output] [-ihv]
input The path to the input file.
--output, -o Where to save the output. By default prints to stdout.
Default: -.
--init, -i Initialise in the current folder.
--help, -h Print the help information and exit.
--version, -v Show the version's number and exit.
Example:
medium-demo example.txt -o out.txt
```
## Copyright & License
GNU Affero General Public License v3.0
© Art Deco 2019