open-index/open-npm huggingface dataset:
npm package: @matco/basic-table
Description: basic-table displays your tabular data in a nice HTML table
Author: Matthieu Corageoud
Latest version: 3.3.1

# basic-table
basic-table displays your tabular data in a nice HTML table.

## Setup
### Manual
Copy the `src` folder as `basic-table` somewhere in your project.

Then, in your code:
```
import {Table, Datasource} from 'basic-table/index.js';
```

### With NPM and Webpack
The instructions below are for those who are using NPM and Webpack.

Install as an NPM dependency of your project:
```
npm i @matco/basic-table --save
```

Then, in your code:
```
import {Table, Datasource} from '@matco/basic-table';
```

## Usage
```
function render_name(value, record) {
	const link = document.createElement('a');
	link.setAttribute('href', `#id=${record.id}`);
	link.appendChild(document.createTextNode(value));
	return link;
}

function render_date(value) {
	return value.toDisplay();
}

new Table({
	container: document.getElementById('table'),
	columns: [
		{label: 'Country', data: 'country', type: Table.DataType.STRING, width: 250},
		{label: 'Name', data: 'name', type: Table.DataType.STRING, render: render_name, width: 200},
		{label: 'Date', data: 'date', type: Table.DataType.DATE, render: render_date, width: 120},
		{label: 'IBAN', data: 'iban', type: Table.DataType.STRING},
		{label: 'Value', data: 'value', type: Table.DataType.NUMBER, width: 120}
	],
	actions: [
		{label: 'Export', url: '#export'}
	]
}).render(new Datasource({url: 'data.json'}));
```

## Example
If you want to see some examples, checkout `example/index.js`.

## Development
The instructions below are for developers.

### Example page
To manually test the project using the example page, run:
```
npm start
```
This will launch a Webpack development server on port 9000.

### Lint & Check
You can lint and check the code of the project with the following commands:
```
npm run lint
npm run tsc
```

### Test
To test the application, run:
```
npm test
```
npm package: @matco/basic-tools
Description: basic-tools is a set of tools that will make your life easier when developing Javascript applications
Author: Matthieu Corageoud
Latest version: 2.4.4

# basic-tools
basic-tools is a set of tools that will make your life easier when developing Javascript applications.

It contains two kind of tools:
* Two tools "enhance" Javascript by prototyping Javascript native classes (use with caution)
* The other tools are Javascript classes that can be imported as ES modules

Some tools can be used in Node.js, some require a DOM.

Javascript extensions:
* **extension.js** extends base Javascript classes with useful methods and helpers.
* **dom_extension.js** (requires a DOM) extends DOM Javascript classes to make everyday DOM operations easier.

Javascript classes:
* **bus.js** creates a bus for your events.
* **csv.js** (requires a DOM) makes creation of CSV files easy.
* **db_connector.js** (requires a DOM) simplifies manipulation of indexedDB.
* **loader.js** (requires a DOM) is able to load code (HTML, CSS or Javascript) in a DOM document.
* **lzw.js** is an implementation of LZW.
* **queue.js** executes a set promises one after the other.
* **reviver.js** transforms a tree or raw objects in a tree of typed object.
* **svg.js** (requires a DOM) simplifies drawing in SVG.
* **timeframe.js** manages timeframe.
* **uuid.js** generated UUIDs.

All tools are tested in their related file *.test.js.

## Usage
### Manual
Copy the tools you need in a folder named `basic-tools` somewhere in your project.

#### Extensions
In a module:
```
import './basic-tools/extension.js';
```

In the HTML:
```
<script type="text/javascript" src="basic-tools/extension.js"></script>
```

#### Tools
Import only what you need:
```
import {Timeframe} from './basic-tools/timeframe.js';
```

### With NPM and Webpack
The instructions below are for those who are using NPM and Webpack.

Install as an NPM dependency:
```
npm i @matco/basic-tools --save
```

#### Extensions
In a module:
```
import '@matco/basic-tools/extension.js';
```

In the HTML:
```
<script type="text/javascript" src="@matco/basic-tools/extension.js"></script>
```

#### Tools
Import only what you need:
```
import {Timeframe} from '@matco/basic-tools/timeframe.js';
```