open-index/open-npm huggingface dataset:
npm package: @fidian/dynamic-buffer
Description: Dynamic buffers can be used for fast string concatenation. They are initialized with a fixed size node Buffer, which will be replaced with a larger one transparently when needed.
Author: Oliver Herdin
Latest version: 1.0.0

@fidian/DynamicBuffer
=====================

> A wrapper around node.js `Buffer` class.

This is a fork of Oliver Herdin's [DynamicBuffer](https://github.com/DDjarod/DynamicBuffer) module, altered to work with newer versions of Node. This one also includes some tests.

The `Buffer` class of node.js by default cannot be used as buffer to concatenate strings, like [`StringBuilder`](http://docs.oracle.com/javase/7/docs/api/java/lang/StringBuilder.html) does for Java. This module contains a wrapper around node.js `Buffer` to concatenate strings, bytes and `Buffer`s onto a `Buffer`. It automatically creates larger `Buffer` objects in the background when more space is needed.

    var buff, clonedDynamic, dynamic, DynamicBuffer;

    DynamicBuffer = require("@fidian/dynamic-buffer");

    // Make a new dynamic buffer.
    dynamic = new DynamicBuffer();

    // Append a string with an optional encoding. You may also specify an
    // optional length.
    dynamic.append("a string");
    dynamic.append("a string", "utf8");
    dynamic.append("1234 <- just the numbers", 4);
    dynamic.append("deadbeef", 2, "hex"); // Only DE AD

    // Write an 8-bit byte.
    dynamnic.write(127);

    // Add another buffer or a DynamicBuffer
    dynamic.concat(Buffer.from("abcd"));

    // Get a copy of the DynamicBuffer. This allocates a new DynamicBuffer.
    clonedDynamic = dynamic.clone();

    // Shrink the DynamicBuffer to the minimum size needed for the current
    // Buffer, or specify the size yourself.
    dynamic.resizeUnderlyingBuffer();
    dynamic.resizeUnderlyingBuffer(dynamic.length - 2); // Remove 2 bytes

    // Returns a view of the underlying buffer. Changing the view will change
    // the dynamic buffer as well.
    buff = dynamic.getBuffer();


Development
-----------

Make sure all changes have tests. Please follow our [contributor guide](CONTRIBUTING.md). This software falls under an [MIT License](LICENSE.md).
npm package: @fidian/handlebars-wax
Description: Effortless wiring of Handlebars data, partials, helpers, and decorators.
Author: Shannon Moeller
Latest version: 7.4.0

# `handlebars-wax`

This is a stripped down of the [original library](https://github.com/shannonmoeller/handlebars-wax) to get around a problem of using out-of-date packages.

You probably don't want this package. Go for the original. It has tests.
npm package: @fidian/metalsmith-less
Description: A LESS plugin for Metalsmith
Author: Christopher Cliff
Latest version: 4.8.0

# metalsmith-less

[![Build Status](https://travis-ci.org/christophercliff/metalsmith-less.png?branch=master)](https://travis-ci.org/christophercliff/metalsmith-less)

A [LESS](http://lesscss.org/) plugin for [Metalsmith](http://www.metalsmith.io/).

## Installation

```
npm install @fidian/metalsmith-less
```

## Usage

```js
var less = require('@fidian/metalsmith-less')

new Metalsmith(__dirname)
    .use(less(options))
    .build()
```

### **`options`** `Object`

- **`pattern`** `String|Array<String>`

    The [pattern](https://github.com/sindresorhus/multimatch) to filter source files. Default `**/*.less`.

- **`removeSource`** `Boolean`

    When `true`, the source files are removed and will not appear in the `build/` directory.  The default is `false`, which will keep a copy of your `*.less` files around.

- **`render`** `Object`

    The options passed to [`less.render(String[, Object])`](http://lesscss.org/usage/#programmatic-usage). Unfortunately, this method is *undocumented*. See https://github.com/less/less-docs/issues/212 for more information. Default `undefined`.

- **`useDynamicSourceMap`** `Boolean`

    Overrides the supplied source map configuration with a dynamic file-level configuration. This is the easiest way to enable source maps in your Metalsmith build. Default `false`.

## Tests

```
$ npm test
```

## Credits and License

This is a fork of [metalsmith-less](https://github.com/christophercliff/metalsmith-less/) and is published as `@fidian/metalsmith-less`.

Changes from original:

* Removed style check to eliminate problems reported via `npm audit`.
* Updated packages.
* Includes the `removeSource` option.

MIT License, see [LICENSE](LICENSE.md) for details.
npm package: @fidian/metalsmith-serve
Description: A metalsmith plugin to serve the build directory.
Author: Mayo Jordanov
Latest version: 1.0.0

[![Build Status](https://travis-ci.org/mayo/metalsmith-serve.svg?branch=master)](https://travis-ci.org/mayo/metalsmith-serve)

# @fidian/metalsmith-serve

A metalsmith plugin to serve the build directory. Best used in development and with metalsmith-watch.

This is a fork that uses updated packages to remove problems reported by `npm audit`.

## Installation

    $ npm install @fidian/metalsmith-serve

## Basic Example

```js
var metalsmith = require('metalsmith');
var serve = require('@fidian/metalsmith-serve');

metalsmith(__dirname)
  .use(serve())
  .build(function(err) {
    if (err) { throw err; }
  });
```

This will serve Metalsmith's build directory on localhost:8080. By default, metalsmith-serve will only log error requests.

## Advanced Example

```js
var metalsmith = require('metalsmith');
var serve = require('@fidian/metalsmith-serve');

metalsmith(__dirname)
  .use(serve({
    port: 8081,
    redirects: {
      '/old_url.php'        : '/new_url/',
      '/old_url.php?lang=en': '/en/new_url/'
    }
  }))
  .build(function(err) {
    if (err) { throw err; }
  });
```

This will serve Metalsmith's build directory on localhost:8081 and will show all served requests.
Requests for missing files will be served with the contents of `/404.html`.
`/old_url.php` and `/old_url.php?lang=en` will be redirected with [301](https://en.wikipedia.org/wiki/HTTP_301) headers.


## Options

### host
Type: `String`
Default: `localhost`

Hostname or IP to listen on.

### port
Type: `Number`
Default: `8080`

Port to listen on.

### document_root
Type: `String`
Default: `metalsmith.destination()`

Directory which to serve. Given path will be resolved with `path.resolve()`

### redirects
Type: `Object`
Default: `{}`

Redirects with [301](https://en.wikipedia.org/wiki/HTTP_301) headers unless the file is located.

e.g.
```js
"redirects": {
  '/old_url.php'        : '/new_url/',
  '/old_url.php?lang=en': '/en/new_url/'
}
```

## License

  MIT
npm package: @fidian/tv4-cli
Description: Command-line tool for data validation using JSON Schema and tv4
Author: Tyler Akins
Latest version: 1.0.0

TV4-CLI
=======

Command-line interface for [tv4](https://github.com/geraintluff/tv4), a JSON-Schema v4 validator.

The easiest way to run this is using `npx`.

```bash
npx tv4-cli --help

npx tv4-cli --schema=schema.json data.json

# Files and schemas can be local files or URLs.
npx tv4-cli --schema=http://example.com/schema.json http://example.net/data.json

# YAML is supported, and multiple data files can be checked at once.
npx tv4-cli --schema=schema.yaml records/*.yaml

# Can fail validation if extra properties are found that are not described in
# the schema.
npx tv4-cli --ban --schema=schema.yaml data.json

# Debugging information can be shown
DEBUG=tv4-cli npx tv4-cli --schema=schema.json data-file.json

# Return codes indicate types of failures
if ! npx tv4-cli --schema=schema.json data.json; then
    echo "Validation failed!"
fi
```
npm package: @fidilen/config
Description: Easy-to-use configuration system for environment variables. The main goal of this is to save projects from using `process.env` while keeping the convenience of referencing the variables across a project.
Author: fidilen.com
Latest version: 1.0.3

# config
Easy-to-use configuration system for environment variables.
The main goal of this is to save projects from using `process.env` while keeping the convenience of referencing the variables across a project.


## Setup
- New folder `config` in the root directory.
- New `env.json` under the `config` folder.
- Set `ENV` as either `dev`, `prod`, or any other keyword.
  - Create a new JSON file in the same directory with suffix after the keyword (eg. `env-dev.json`)
  - Otherwise, default config is the `env.json`

> Note:
> You should add `config` in your `.gitignore` if you don't want to have these included in your commits.

### Examples
- `env.json`
```json
{
    "ENV": "dev"
}
```

- `env-dev.json`
```json
{
    "VARIABLE_NAME": "123"
}
```


## Usage
```js
const config = require('@lena/config');

console.log(config.VARIABLE_NAME);
```
npm package: @fidilen/env
Description: Easy-to-use configuration system for environment variables. Acts as subtitute for .env files if you don't want to update .env from time to time, or if you need to expose variables, but not .env.
Author: fidilen.com
Latest version: 2.2.0

# config
Easy-to-use configuration system for environment variables.
The main goal of this is to save projects from using `process.env` while keeping the convenience of referencing the variables across a project.


## Setup
- New folder `env` in the root directory.
- New `env.json` under the `env` folder.
- Set `ENV` as either `dev`, `prod`, or any other keyword.
  - Create a new JSON file in the same directory with suffix after the keyword (eg. `env-dev.json`)
  - Otherwise, default config is the `env.json`

> Note:
> You should add `env` in your `.gitignore` if you don't want to have these included in your commits.

### Examples
- `env.json`
```json
{
    "ENV": "dev"
}
```

- `env-dev.json`
```json
{
    "VARIABLE_NAME": "123"
}
```


## Usage
```js
const config = require('@fidilen/config');

console.log(config.VARIABLE_NAME);
```
npm package: @fidilen/gsheets
Description: GSheets API
Author: fidilen.com
Latest version: 1.1.1

# gsheets
##GSheets API

Default: `/config/credentials.json`

**.env**
```
GSHEETS_CREDENTIALS=/path/to/credentials.json
```

```js
await GSheets.select({
    sheet_id: SHEET_ID,
    range: RANGE,
    where: {...}
})
```

```js
await GSheets.insert({
    sheet_id: SHEET_ID,
    range: RANGE,
    records: [
        {...}
    ]
})
```

```js
await GSheets.prepend({
    sheet_id: SHEET_ID,
    range: RANGE,
    where: {...}
})
```

```js
await GSheets.append({
    sheet_id: SHEET_ID,
    range: RANGE,
    where: {...}
})
```

```js
await GSheets.update({
    sheet_id: SHEET_ID,
    range: RANGE,
    where: {...}
})
```

```js
await GSheets.delete({
    sheet_id: SHEET_ID,
    range: RANGE,
    where: {...}
})
```