Skip to content

Commit

Permalink
update doc index
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkal committed Apr 7, 2021
1 parent 58d60cb commit 66600c0
Show file tree
Hide file tree
Showing 6 changed files with 106 additions and 25 deletions.
107 changes: 84 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,67 @@ After the Deno team decided to break import URLs, the canonical import domain ca

## Included Utilities

### abort-iterator.ts

Creates an iterator that is abortable. Based on the npm package by the same name

### archieml.js

Parse a string of text as ArchieML.

### args.ts

Utilities for parsing CLI arguments.

### debug.ts

Debugging utility for Deno. Ported from the npm package by the same name.

### dedent.ts

Dedent is a tagged template literal function.
It is used by yaml-tag.ts and has tests to ensure consistency with a whitespace-sensitive content.

### doc-gen.ts

Parse File-level JSDoc from a folder of TS/JS files for document generation.
Parse File-level JSDoc from a folder of TS/JS files for document generation

### drone.ts

TypeScript types for Drone CI configuration.

### emittery.ts

Simple and modern async event emitter
Ported from the node module@0.7.1

### function.ts

Kite™️ Support for OpenFaaS Functions.

### go.ts

Simplified async error handling in TypeScript.

### hash-object.ts

Take a JavaScript object and compute a sha256 hash of it for comparison.

### http-cache-semantics.ts

Parses Cache-Control and other headers. Helps building correct HTTP caches and proxies. Ported from the npm package by the same name.
Parses Cache-Control and other headers. Helps building correct HTTP caches and proxies.
Ported from the npm package by the same name. Code optained via the BSD-2 license. See attribution below.

### kite.ts
### karabiner.ts

A library and DSL to generate karabiner.json config. Can result in a 30x line reduction.

Kite™️ is a Simplified Config Generation Library.
1. Call rule()
2. Call out()

### kite.ts

Kite™️ is a Simplified Config Generation Library
Ground Rules:

1. No async code. Ever.
Expand All @@ -65,76 +101,101 @@ kx is a simplified Kubernetes Config SDK for Kite.

### magic-string.js

Manipulate strings like a wizard.

Manipulate strings like a wizard
NOTE: This is the ES bundle with the sourcemap-codec import corrected.
Source is available at
https://cdn.jsdelivr.net/npm/magic-string@0.25.6/dist/magic-string.es.js

### md5-apache.ts

A port of npm/apache-md5 for use with htpasswd.
Portions of this work were obtained via the MIT License. Copyright (c) Gevorg Harutyunyan.

### merge.ts

Provides generic object merging functions. Useful for config generation.
Portions of this work were obtained via the Apache 2.0 License.
That original work is Copyright 2020, jk authors.

### proxymise.ts

Chainable Promise Proxy utility. Proxymise allows for method and property chaining without need for intermediate then() or await for cleaner and simpler code.
Chainable Promise Proxy utility.
Proxymise allows for method and property chaining without need for intermediate
then() or await for cleaner and simpler code.
@see https://github.com/kozhevnikov/proxymise

### quokka-shim.ts

A shim for test functions when running Deno code.
Consider using @brandonkal/deno-quokka and babel-plugin-deno npm packages for a more robust debugging experience.
Consider using @brandonkal/deno-quokka and babel-plugin-deno npm packages for
a more robust debugging experience.

### reload.ts

CLI to reload Deno files as required. Pass number of commits to have the files reloaded.

### resolve-object
### resolve-object.ts

Recursively resolve any promises in an object to form a resulting JSON structure.

### resolve-promise-object.ts

Recursively resolve any promises in an object to form a resulting JSON structure.

### retry.ts

Retry an async function for exponential backoff. With a retryFetch implementation.

### runtypes.ts

A Deno port of the great RunTypes library. Use TypeScript in the runtime.
Port introduces loose conversion. This means a check() call may
modify if a property required.
Primitives should be assigned to themselves.
"false" | "true" > boolean
"null" > null
"42" > 42
See https://github.com/brandonkal/runtypes

Port introduces loose conversion. This means a check() call may modifies if required.
### shellbox.ts

- Primitives should be assigned to themselves.
- "false" | "true" > boolean
- "null" > null
- "42" > 42
- See https://github.com/brandonkal/runtypes
Utilities to sandbox subprocess commands

### sourcemap-codec.ts

Encode/decode sourcemap mappings

### testutils.ts

Utilities for testing. Replicates expect from Jest.

### to_aml.js

Converts JSON structure to ArchieML text string.

### unraw.ts

Undo `String.raw`.

Convert raw escape sequences to their respective characters
Convert raw escape sequences to their respective characters.

### utils.ts

A collection of useful small functions in one location.

### yaml-formatter.ts

Parses YAML or JSON input and prints out YAML documents with a stable object sort. Ideal for converting JSON to YAML. Useful as a lightweight CLI or as a formatting function.
Parses YAML or JSON input and prints out YAML documents with a stable object sort.
Ideal for converting JSON to YAML.
Useful as a lightweight CLI or as a formatting function.

### yaml-tag.ts

Write YAML within TypeScript programs for cleaner and more concise code.

This module provides the following exports:

- y (yaml text tagged template function)
- printYaml (JS Object Array to YAML multi-document text)

### testutils.ts

Utilities for testing. Replicates expect and mocks out functions such as describe from Jest. Useful for porting Node libraries.

## Others

### @brandonkal/deno-quokka
Expand Down
4 changes: 3 additions & 1 deletion archieml.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
/**
* @file archieml.js
* @copyright 2020 Brandon Kalinowski
* @copyright 2021 Brandon Kalinowski
* Based on the Apache 2.0 licensed archieml-js parser:
* @copyright 2015 The New York Times Company
* Structure inspired by John Resig's HTML parser
* http://ejohn.org/blog/pure-javascript-html-parser/
* @description Parse a string of text as ArchieML.
* @license Apache 2.0
*/
//@ts-nocheck -- this code works.

Expand Down
7 changes: 7 additions & 0 deletions debug.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* @file debug.ts
* @copyright 2021 Brandon Kalinowski (@brandonkal). All Rights reserved.
* Obtained via MIT license. Copyright (c) 2019 Nikola Ristic
* @description Debugging utility for Deno. Ported from the npm package by the same name.
*/

// https://github.com/brandonkal/deno-debug
import debug from 'https://raw.githubusercontent.com/brandonkal/deno-debug/master/debug.ts'
export default debug
2 changes: 1 addition & 1 deletion doc-gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default async function genDoc(files: string[] = []) {
)
const fileContents = await Promise.all(
filenames.map((fn) => {
return fs.readFileStr(fn)
return Deno.readTextFile(fn)
})
)
const metadata = fileContents.map(parse)
Expand Down
8 changes: 8 additions & 0 deletions inkjet.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,11 @@ fi
```sh
deno cache --unstable `fd -e ts`
```

## index

> Generate Readme index from TypeScript files
```
deno --unstable run --allow-read doc-gen.ts -m
```
3 changes: 3 additions & 0 deletions to_aml.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* @file to_aml.js
* @author Brandon Kalinowski (@brandonkal)
* @copyright 2021 Brandon Kalinowski. All Rights Reserved.
* @description Converts JSON structure to ArchieML text string.
* @license Contact for license
*/
//@ts-nocheck -- this code works.

Expand Down

0 comments on commit 66600c0

Please sign in to comment.