open-index/open-npm huggingface dataset:
npm package: @knn_labs/conduit-common
Description: Common types and utilities for Conduit SDK clients
Author: KNN Labs
Latest version: 0.2.0

# @knn_labs/conduit-common

Shared types and utilities for Conduit SDK clients.

## Overview

This package contains common TypeScript types and utility functions used by both the Admin and Core SDK clients. It eliminates type duplication and ensures consistency across all Conduit client packages.

## Installation

This package is not published to npm and is used locally within the Conduit monorepo:

```json
{
  "dependencies": {
    "@knn_labs/conduit-common": "file:../Common"
  }
}
```

## Included Types

### Base Types
- `PaginatedResponse<T>` - Standard paginated response format
- `PagedResponse<T>` - Alternative paged response format
- `ErrorResponse` - Standard error response structure
- `ApiResponse<T>` - Generic API response wrapper
- `SortDirection` - Sort direction enum ('asc' | 'desc')
- `SortOptions` - Sorting configuration
- `FilterOptions` - Filtering and pagination options
- `DateRange` - Date range specification
- `HttpMethod` - HTTP method types
- `RequestOptions` - Request configuration options
- `Usage` - Token usage tracking
- `PerformanceMetrics` - Performance measurement data

### Pagination Types
- `PaginationParams` - Basic pagination parameters
- `SearchParams` - Search with pagination
- `TimeRangeParams` - Time-based filtering
- `BatchOperationParams` - Batch operation configuration

### Model Capabilities
- `ModelCapability` - Enum of all supported model capabilities
- `ModelCapabilityInfo` - Capability metadata
- `ModelCapabilities` - Model capability definition
- `ModelConstraints` - Model-specific constraints
- `getCapabilityDisplayName()` - Get human-readable capability names
- `getCapabilityCategory()` - Get capability category

## Usage

### Importing Types

```typescript
import type { 
  PaginatedResponse, 
  ErrorResponse, 
  ModelCapability 
} from '@knn_labs/conduit-common';
```

### Using Model Capabilities

```typescript
import { ModelCapability, getCapabilityDisplayName } from '@knn_labs/conduit-common';

// Check capability
if (capability === ModelCapability.CHAT) {
  console.log('Chat model');
}

// Get display name
const displayName = getCapabilityDisplayName(ModelCapability.IMAGE_GENERATION);
// Returns: "Image Generation"
```

## Development

To build the package:

```bash
npm run build
```

To watch for changes:

```bash
npm run dev
```

## Type Safety

When re-exporting types from this package, use `export type` to ensure proper TypeScript compilation:

```typescript
// Correct
export type { PaginatedResponse, ErrorResponse } from '@knn_labs/conduit-common';

// Also correct for type aliases and enums
export { type SortDirection, ModelCapability } from '@knn_labs/conduit-common';
```
npm package: @knno/i18n
Description: An i18n library
Author: Thor Qin
Latest version: 1.1.0

# thor-i18n

A small front-end i18n library

## Installation

```bash
npm install @knno/i18n
```

## Usage

This package supports both CommonJS and ES Modules:

### CommonJS

```javascript
const { setLanguage, i18n, addDict } = require('@knno/i18n');

// Add a dictionary
addDict('zh-cn', {
  'hello': '你好',
  'world': '世界'
});

// Set language
setLanguage('zh-cn');

// Use translation
console.log(i18n('hello')); // 输出: 你好
```

### ES Modules

```javascript
import { setLanguage, i18n, addDict } from '@knno/i18n';

// Add a dictionary
addDict('zh-cn', {
  'hello': '你好',
  'world': '世界'
});

// Set language
setLanguage('zh-cn');

// Use translation
console.log(i18n('hello')); // 输出: 你好
```

## Build

This package uses dual module export, which means it provides both CommonJS and ES Modules versions:

- CommonJS: `dist/index.cjs.js`
- ES Modules: `dist/index.esm.js`
- TypeScript definitions: `dist/index.d.ts`

To build the package:

```bash
npm run build
```

This will compile the TypeScript source code into both module formats and place them in the `dist` directory.
npm package: @knno/jsx-ui
Description: A simple UI framework
Author: Thor Qin
Latest version: 1.0.43

# @knno/jsx-ui

A simple web UI framework for building user interfaces.

# Frontend project creation

Command line tools for project creation are currently under development.

To get started, create a new project using the @knno/jsx example as reference (see [@knno/jsx documentation](https://www.npmjs.com/package/@knno/jsx)). Then install this package via:

```bash
npm install @knno/jsx-ui
```
npm package: @knno/time
Description: A simple date time helper toolkit.
Author: thor.qin@outlook.com
Latest version: 1.4.1

# @knno/time

### Description

A JavaScript time helper toolkit.

### Installation

```
npm i @knno/time
```

### How to use

1. Import it

```javascript
import time from "@knno/time";
```

2. time.now()

```javascript
console.log(time.now()); // get current time equal to new Date()
```

3. time.moment()

```javascript
console.log(time.moment(200000)); // get description string of a time duration: xxx days xxx hours xxx minutes xxx seconds
console.log(time.moment(200000), { maxUnit: "h" }); // biggest unit is hour
console.log(time.moment(200000), { minUnit: "m" }); // smallest unit is minute
// available unit are 'd', 'h', 'm', 's'
```

4. time.interval()

```javascript
console.log(time.interval("2019-1-1", "2020-2-10", "d"));
// available unit are 'd', 'h', 'm', 's', 'ms'
```

5. time.add()

```javascript
console.log(time.add("2019-1-1", 30, "d"));
// available unit are 'd', 'h', 'm', 's', 'ms'
```

6. time.dayOfYear()

```javascript
console.log(time.dayOfYear(new Date()));
```

7. time.daysOfMonth()

```javascript
console.log(time.daysOfMonth(new Date())); // get total days of month
```

8. time.parse()

```javascript
console.log(time.parse('2019-1-12'));
console.log(time.parse('2019-1-12 22:22:00'));
console.log(time.parse('2019-1-12T22:22:00+0800'));
console.log(time.parse('2019-1-12T22:22:00Z'));
console.log(time.parse('1/1/2020'));
console.log(time.parse('Jan 1, 2020'));
......
// if some format cannot be auto detect, you can specify format manually
console.log(time.parse('2019年5月31日 20:08:30', 'yyyy年M月d日 hh:mm:ss'));
```

9. time.format()

```javascript
console.log(time.format(time.now()); // use default format ISO8601 to convert to string
console.log(time.format(time.now(), 'yyyy年MM月dd日'); // use custom format to convert
......
```

That's all
npm package: @knno/tpl
Description: A simple JS Template Engine
Author: Thor Qin
Latest version: 1.1.8

# @knno/tpl

### Description
A simple JS template engine.

### Installation

```
npm i @knno/tpl
```

### Usage

> #### Rendering synchronously

```javascript
import { render } from '@knno/tpl';

const template = `
{{@arg name, messages}}
One day I met {{name}}:
{{@loop idx:msg of messages}}
{{@if idx%2==0}}I:{{@else}}Bob:{{@end if}} {{@unsafe msg}}
{{@end loop}}
`;

const data = {
  name: 'Bob',
  messages: [
    'How are you?',
    'Fine thank you and you?',
    'I\'m fine too.'
  ]
};

console.log(render(template, data));

```

> #### Rendering asynchronously

```javascript
import { renderAsync } from 'thor-tpl';

const template = `
{{@arg name, messages}}
One day I met {{name}}:
{{@loop idx:msg of messages}}
{{@if idx%2==0}}I:{{@else}}Bob:{{@end if}} {{@unsafe msg}}
{{@end loop}}
`;

const data = {
  name: 'Bob',
  messages: [
    'How are you?',
    'Fine thank you and you?',
    'I\'m fine too.'
  ]
};

(async function () {
  let result = await renderAsync(template, data)
  console.log(result);
})();


```

> #### Extend template function

```javascript
import { renderAsync } from 'thor-tpl';

const template = `
{{@fn range}}
{{@loop idx of range(10)}}
{{@unsafe idx}}
{{@end loop}}
`;

const options = {
  trace: (fn) => { // If you will debug generated function, you can write function code to file.
    console.log(fn.toString())
  },
  fn: { // Custom function write here
    range: (max) => {
      max = max || 0;
      var arr = [];
      for (let i = 0; i < max; i++) {
        arr.push(i);
      }
      return arr;
    }
  }
};

(async function () {
  let result = await renderAsync(template, {}, options)
  console.log(result);
})();
```

> #### Compile once render multiple times

```javascript
import { render, compile } from 'thor-tpl';

const template = `{{@arg msg}}{{msg}}`;
let fn = compile(template);

for (let i = 0; i < 3; i++) {
  let result = render(fn, {msg: 'Hello World!'});
  console.log(result);
}

```

### Complete example

You can see project [thor-web](https://gitee.com/thor.qin/thor-web)'s source code to understand how to use this library.


That's all.
npm package: @knno/web-lite
Description: An light weight web framework for node-js.
Author: Thor Qin
Latest version: 1.7.2

# @knno/web Framework

This framework is a light-weight, easy to use library. It provided most commonly used middlewares to let you can develop a full featured web application.

# Getting start:

## Create the project

Create a full featured demo project that using @knno/web as back-end framework and using @knno/ui as front-end framework:

```
npm create knno-web <project-name>
```

## Build project

```bash
npm run build
```

## Start the project
```bash
npm start
```

## Use nodemon to debug project
1. Start watching
```
npm run watch
```
2. Create a 'JavaScript Debug Terminal' window (in vscode) and run following command:
```
npm run debug
```

# Features

* Session: Control user login status
* Security: Control access authorization
* Body Parser: Provide methods to access request contents
* Controller: Route request to controller js file
* Static: Provide static resources access
* Template: Provide js template render method (Powered by thor-tpl)
* WebSocket: Provide WebSocket communication
* Auto generate api-docs page (See demo project to get more details)
npm package: @kno2/bluebutton
Description: BlueButton.js helps developers navigate complex health data with ease.
Author: Kno2, LLC
Latest version: 0.6.12

> This repository is an internal fork of [bluebutton.js](https://github.com/blue-button/bluebutton.js)

BlueButton.js helps developers parse and generate complex health data formats like C-CDA with ease, so you can empower patients with access to their health records.

## Quick Start

BlueButton.js supports a few different health data types, like C32 and CCDA. To parse a health document, pass the source data to `BlueButton`:

```JavaScript
var myRecord = BlueButton(xml);
```

BlueButton.js will detect the document type and choose the appropriate parser. The returned object has the following properties:

```JavaScript
myRecord.type    // The document type
myRecord.source  // The parsed source data with added querying methods
myRecord.data    // The final parsed document data
```

## Detailed Documentation

[View the documentation](http://blue-button.github.io/bluebutton.js/docs) for an explanation of the data sections, much more detailed sample code, instructions on how to generate a build, etc.

## Kno2 Updates

There are a number of pre parsed sections for CCDA and C32 documents.  In the orignal bluebutton.js the section name was a key off of
the data object containing an array of entries. Those sections now contain an object vs an array with the following properties.

```
{
  displayName: "friendly display name",
  templateId: "",
  text: "<div>Some HTML for section</div>",
  entries: []
}
```

1. **displayName** - Friendly name to display in viewer.
2. **templateId** - The HL7 templateId for the section. This currently isn't filled for the pre parsed sections such as allergies, medications, etc. For any generically created section, there will be a template id.
3. **text** - the narrative text (generally HTML) for each section.  All the objects on data outside of demographics, document and smoking status should have this value set.  We can default to displaying this HTML if there is no custom section display.
4. **entries** - the original array of entries

### Generic sections

We've also modified BlueButton.js to include generic sections.  These are sections where a specific templateId isn't present in section mapping function for c32, ccd, etc.  Generic sections only parse out narrative text, displayName and templateId.
this gave us the ability to still display and filter on a section that wasn't explicitly added in the BlueButton library.