open-index/open-npm huggingface dataset:
npm package: @hn250424/aero
Description: Web component library with built-in convenience features
Latest version: 0.1.3

# Aero

**Aero** is a Web Component–based UI library focused on **behavior and convenience**.

👉 You control the CSS.  
👉 Aero handles the behavior.

## Installation

Using a bundler (such as Vite or Webpack) is recommended.
If you are not using a bundler, you can use Aero directly via a CDN without installation.

```bash
npm install @hn250424/aero
```

## Usage

If you're using a bundler (Vite, Webpack, etc.), import Aero once at your application entry point:

```ts
import "@hn250424/aero";
```

You can then use the components in your HTML:

```html
<aero-numeric-input></aero-numeric-input>
```

If you import the component type explicitly,
you can benefit from type checking and IDE auto-completion when creating elements dynamically.

```ts
import type { AeroNumericInput } from "@hn250424/aero";
const input = document.createElement("aero-numeric-input") as AeroNumericInput;
```

For simple usage without a bundler, you can include Aero directly via CDN:

```html
<script src="https://unpkg.com/@hn250424/aero/umd"></script>
```

You can then use the components in your HTML:

```html
<aero-numeric-input></aero-numeric-input>
```

## Documentation

https://hn250424.github.io/aero/
npm package: @hn3000/argus
Description: file watcher, can watch multiple patterns, run multiple targets
Author: Harald Niesche
Latest version: 0.2.4


# Argus: project watcher runs `npm run` scripts

Conveniently watch several directories / patterns at the same time and trigger the appropriate `npm run` scripts.

Could probably be done simply using 'watch', but I'm too lazy to write a watch-filter function. While chokidar-cli can be used to run a single command when a change is matched, this tool can watch several patterns at the same time and run different tools for each set of patterns.

Different tools will not be run in parallel, so that it is easier to interpret the output of the tools.

## Examples

The command 

    $ argus src -r tsc **/*.sass -r sass

will run `npm run tsc` for any changes to files in `src` and `npm run sass` for changes
in sass files (having names that end in `.sass`).

Multiple patterns can be given for the same run script:

    $ argus src/**/*.ts src/**/*.tsx -r tsc


You can also ignore stuff:

    $ argus src !**/*.js -r tsc

will ignore changes to js files.

## Commandline syntax

    $ argus <global options> [<patterns...> -r <cmd> ]+

### Patterns

Patterns supported are the extended wildcards understood by [chokidar](https://github.com/paulmillr/chokidar). Patterns starting with an exclamation point "!" are used as ignored patterns.

### Command to run

 * `-r <cmdsuffix>`, `--run <cmdsuffix>`: command to run if one of the preceeding patterns matches a changed file, gets appended to the basecmd (`npm run` by default).


### Global options
 * `n`, `--dry-run`: don't run `npm run`, just echo command instead of running it
 * `t <ms>`, `-throttle <ms>`: throttle change events to less than one per number of milliseconds given (Default is no throttle.)
 * `-d <ms>`, `--debounce <ms>`: debounce change events to occur only after the given number of milliseconds has passed without further changes. (Default debounce time is 1500 milliseconds. Specify 0 to disable.)
 * `-b <basecmd>`, `--basecmd <basecmd>`: base command, default is 'npm run', will be prepended to whatever is given as -r
 * `-r <cmd>`, `--run <cmd>`: command to run if a change was detected, every set of patterns must be followed by this option
npm package: @hn3000/doxic
Description: Generator for runnable documentation, inspired by docco and jasmine docs.
Author: Harald Niesche
Latest version: 0.3.2


experimental documentation generator

installation (for now):

  npm link



# doxic -- a Tool for executable docs <!-- omit in toc -->

Documentation generator inspired by [docco] that allows examples to be run.

Only the `parallel` template has the required support code for running 
examples.

##  What it is about

In order to make the documentation easier to understand, example code
can be run directly in the page where it is displayed. If it makes sense,
examples can also be edited.

## Code Examples

The following markdown will create a page that has the explanation, the 
example code and a <button disabled>run</button> button that can be used
to actually run the code in the browser.

   ````markdown

    Click the <button disabled>Run</button> in this example to see it in action.
    ~~~ javascript { runnable: true }
    window.alert("See? It's really simple!");
    ~~~

    ````

You may want some support code to always run:

   ````markdown

    ~~~ { inject: 'script' }
    function showAlert(text) {
      window.alert(text);
    }
    ~~~



    Click the <button disabled>Run</button> in this example to see it in action.
    ~~~ javascript { runnable: true }
    showAlert("See? It's really simple!"); // uses the function defined above
    ~~~

    ````



Links

[docco]

[docco]:http://github.com/jashkenas/docco
npm package: @hn3000/json-ref
Description: simple resolver for json reference and json pointer
Author: Harald Niesche
Latest version: 1.1.5


# JSON Reference tools

Contains some relatively simple tools to parse and resolve JSON Pointer and JSON Reference notation.

A custom fetch implementation must be provided to allow clients to provide different resolution strategies. For most uses a very simple adapter can be used with isomorphic-fetch, allowing operation in both node and browser.

Example code:

```Typescript
import { JsonReferenceProcessor } from '@hn3000/json-ref';

let referenceProcessor = new JsonReferenceProcessor();

let promise = referenceProcessor.expandRef ("./somedata.json#/foo");

promise.then((somedataFoo:any) => {
  // somedata.json#/foo is in somedataFoo
});

```
At this point, all referenced files have been loaded so that all references can be resolved without fetching anything.

The object has only been expanded as far as necessary to access the property foo. All further property accesses work through dynamic getters, avoiding any issues with (indirect) cyclic references. Direct cyclic references will currently lead to endless promise resolution, i.e. they will not even crash with a stackoverflow.
npm package: @hn3000/metamodel
Description: Meta Model for TypeScript and EcmaScript apps, to help with JSON schema processing and UI construction.
Author: Harald Niesche
Latest version: 1.10.0

Meta Model for JavaScript Apps
----

Coming from statically typed languages like Pascal, C and C++, I always wanted to have
more strict typings for my JavaScript classes. While TypeScript allows me to describe
the data using interfaces, I feel it lacks RTTI -- runtime information about the objects
involved that would allow me to construct user interfaces dynamically and validate
incoming data (either from some remote connection or typed in by a user) against the
type information.

This is my attempt at building something to fill this gap.


A metamodel is created like this:

    const sampleObject = {
        lala: 12,
        blah: "Some String",
        blub: 3.1415 * 12
    };

    const modelTypes = require("metamodel").modelTypes;

    const model = modelTypes.addObjectType('sample')
      .addItem('lala', modelTypes.type('number/int'))
      .addItem('blah', modelTypes.type('string'))
      .addItem('blub', modelTypes.type('number'));

Once the model exists it in the modelTypes registry, it can always be referred
to by name:

    const model = modelTypes.type('sample');
    
And input data can be validated by the model:

    const inputData = {
        lala: "12",
        blah: "Another String",
        blub: 27.12
    };
    
    const context = modelTypes.createParseContext(inputData, model);
    context.allowConversion = true;
    const isValid = context.validate();
    if (context.warnings.length) {
        console.warn(`context.messages.map(e => e.msg).join(', ')`);
    }
    if (context.errors.length) {
        console.error(`context.errors.map(e => e.msg).join(', ')`);
        throw new Error('Validation failed');
    }

    // turn text input into actual objects
    const parsedInput = context.parse();


At this point, context will contain warnings and errors if the data does
not fit the metamodel. With allowConversion=true, the metamodel will
parse "12" into a number, if allowConversion=false, the string value will
result in an error message.

## Using JSON Schema

Parsing a JSON schema into a metamodel uses a special kind of IModelTypeRegistry, which can not only parse the schemas, but also acts as a registry for the parsed schemas:

```
  
  const schemaResponse = await fetch(schemaUrl);
  const schema = await schemaResponse.json();

  const models = new ModelSchemaParser();

  const model = models.parseSchemaObject(schema) as IModelTypeComposite<any>;

  // just a different way to get at the model for this schema:
  const modelByName = models.type(schema.id); 

```

And that model can then be used the same as shown above.

You can also provide some defaults for the parser to amend imported schemas with some useful defaults, like e.g. a regex for all strings:

```
  const models = new ModelSchemaParser(undefined, {
    strings: { pattern: /^[^\u0000-\u001f\u007f-\u009f\"<>\{\}\[\]]*$/ },
  });

  const model = models.parseSchemaObject(schema) as IModelTypeComposite<any>;

```
npm package: @hn3000/metamodel-matching
Description: Meta Model Type Matching logic for dynamic UI construction and type-dependent rendering.
Author: Harald Niesche
Latest version: 0.9.3

# Metamodel Matching

This project contains a mechanism to map combinations of an IModelType and some
other data (fieldname, type name, kind, some others) to an object or function,
to facilitate metamodel-drive construction of UI (or basically, anything).

The underlying idea is that a certain type of data should always be rendered
or edited identically, for that purpose you can map components to combinations
of their type, their type's kind, flavor and whatever other data you use
for differentiating data types (you can basically attach anything you like
to your schema nodes).

You can obtain a mapping from a Matchmaker like so:

```

const matchmaker = /*...*/;
const component = matchmaker.findBest(type, fieldname);

```


The construction of matchmakers is done in two phases, they are added
to a matchmaker builder (by calling it's chainable `add(obj, matcher)`method)
and when all components have been added, a matchmaker
is created by calling `freeze()` on the builder:

```
const matchmaker =
        matchMakerBuilder([])
        .add(editArray, MatchQ.kind('array'))
        .add(editObject, MatchQ.and(MatchQ.kind('object'), MatchQ.typeName('Properties')))
        .freeze();

```

The empty array given to the `matchmakerBuilder()` can also be filled with
tuples of your desired type `T` and matchers, ie. instances of type 
`MetamodelMatchFun`, which is defined as:

```
type MetamodelMatchFun =
  (
    type: IModelType<any>, 
    fieldName:string, 
    flavor:string, 
    container?: IModelTypeComposite<any>
  ) => number;
  ```
npm package: @hn3000/react-stockcharts
Description: Highly customizable stock charts with ReactJS and d3 (tmp fork by @hn3000)
Author: Ragu Ramaswamy
Latest version: 0.7.4-hn.5

## React Stockcharts

Forked to fix some small problems with the current 0.7.0-beta.22:
 - new clamping code did not lint
 - propTypes for clamp did not match defaults
 - ScatterSeries couldn't handle gaps (and I needed it to)
 - no ArrowMarker (for ScatterSeries)


Note: steps to release:
  * change version (and base version) in package.json, src/index.js and this file
  * build `npm run release`
  * publish `cd build && npm publish`

Rest of this file is unchanged, badges point at the original etc.:

[![Join the chat at https://gitter.im/rrag/react-stockcharts](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/rrag/react-stockcharts?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![npm version](https://badge.fury.io/js/react-stockcharts.svg)](https://badge.fury.io/js/react-stockcharts)

Create highly customizable stock charts

Built with [React JS](http://facebook.github.io/react/) and [d3](http://d3js.org/)

Multiple [quick start examples](https://github.com/rrag/react-stockcharts-examples2)

- svg and canvas for improved performance.
- pan and zoom, on touch devices too

#### Chart types

- Scatter
- Area
- Line
- Candlestick
- OHLC
- HeikenAshi
- Renko
- Kagi
- Point & Figure

#### Indicators

- EMA, SMA, WMA, TMA
- Bollinger band
- SAR
- MACD
- RSI
- ATR
- Stochastic (fast, slow, full)
- ForceIndex
- ElderRay
- Elder Impulse

(more to come),

and it is simple to create your own indicator too

#### Interactive Indicators

- Trendline
- Fibonacci Retracements
- Gann Fan
- Channel
- Linear regression channel

---

### Installation
```sh
npm install  --save react-stockcharts
```

### Documentation

[Documentation](http://rrag.github.io/react-stockcharts)

[Ready to use Examples](https://github.com/rrag/react-stockcharts-examples2)

### Demo

[Demo v1](http://rrag.github.io/stockcharts-demo/) (closed source) built with react-stockcharts

[Demo v2](https://demo.reactstockcharts.org/) - Includes
- Serverside calculation of indicators
- Pan to load more
- option of websocket/xhr to download data
- Multiple chart types, including advanced types
- Drawing objects
- Indicators
- Compare with another

I am exploring options to license this, contact me if you are interested

### Contributing

Refer to [CONTRIBUTING.md](./CONTRIBUTING.md)

### Stability

This is alpha state software, the api will change with each minor version.

### Roadmap

[Roadmap](./docs/md/COMING-SOON.md)

### LICENSE

[MIT](./LICENSE)
npm package: @hn3000/simpletemplate
Description: simplest possible string template engine
Author: Harald Niesche
Latest version: 0.12.0


# Simple String Templates

The simplest TypeScript / JavaScript string template implementation I could
think of. No configuration, no options. Okay, maybe some configuration. But
only very little, and all of it completely optional.

Text to be replaced is marked with `{{var}}`, the replacement for variables is
provided as a hash.

# Examples


    let template = new Template('Hello {{who}}!');
    console.log(template.render({ who: 'World!'}));

Prints the text "Hello World!!" (without the quotes).

Templates can have default values for replacement variables:

    let template = new Template('Hello {{who}}!', {  who: 'world' });
    console.log(template.render(null));

Prints the text `Hello world!`. The argument after the template string provides
default values for the replacement variables.

Without the default values, the replacement variable would be echoed, including
the surrounding `{{}}`.

    let template = new Template('Hello {{who}}!');
    console.log(template.render(null));

Prints the text `Hello {{who}}!`.

Default values can be changed:

    let template = new Template('Hello {{who}}!', {  who: 'world' });
    console.log(template.render(null));
    template.setDefaults({ who: 'universe' });
    console.log(template.render(null));

Prints two lines:

    Hello world!
    Hello universe!


Templates provide the names used in placeholders:

    let template = new Template('Hello {{who}}!');
    console.log(template.getNames());

Will print

    [ 'who' ]

# Tests

The current unit tests cover 100% of the code (lines and branches).
npm package: @hn3000/swagger-example-generator
Description: Annotate swagger file with generated example data
Author: Harald Niesche
Latest version: 0.2.2


# Swagger API Example generator

This tool generates examples for a swagger-api spec using json-schema-faker.

It has an API and a simple CLI:

    swagger-example-generator --spec api.swagger.yaml --examples examples.json

It will print a JSON file containing examples keyed to the schemas from the
api spec by json pointers. By default it creates a single example request for
every operation and one for each of the declared responses
found in the API spec.
npm package: @hn3000/swagger-optimizer
Description: Simple tool to transform swagger API specifications.
Author: Harald Niesche
Latest version: 1.0.3


# swagger-optimizer

A tool to perform transformations on (non-conforming) swagger files so that the standard swagger tooling can be used on them.

The transformations supported are:

- enum unification
  finds identical enums and turns them into $ref to a common definition

- remove allOf
  removes allOf and merges the referenced definitions into the one containing the allOf


## Examples

### enum Unification

The following definition with a redundant enum:

    {
      "type": "object",
      "properties": {
        "something": { "type": "string", "enum": [ "a", "b", "c" ] },
        "somethingElse": { "type": "string", "enum": [ "a", "b", "c" ] }
      }
    }

gets turned into one with a common enum named after the shortest property it's used in:

    {
      "type": "object",
      "properties": {
        "something": { "$ref": "#/definitions/SomethingEnum" },
        "somethingElse": { "$ref": "#/definitions/SomethingEnum" }
      },
      "definitions": {
        "SomethingEnum": { "type": "string", "enum": [ "a", "b", "c" ] }
      }
    }


### allOf Removal


    {
      "type": "object",
      "properties": {
        "something": {
          "type": "string"
        }
      },

      "allOf": [
        {
          "properties": {
            "something": {
              "enum": [ "a", "b", "c" ]
            },
            "somethingElse": {
              "type": "string",
              "enum": [ "a", "b", "c" ]
            }
          }
        },
        {
          "require": [
            "something",
            "somethingElse"
          ]
        }
      ]
    }
-->

    {
      "type": "object",
      "properties": {
        "something": { "type": "string", "enum": [ "a", "b", "c" ] },
        "somethingElse": { "type": "string", "enum": [ "a", "b", "c" ] }
      },
      "require": [ "something", "somethingElse" ]
    }