open-index/open-npm huggingface dataset:
npm package: @inf-monkeys/vines
Description: ### 安装
Latest version: 0.0.73

# Vines.js

### 安装

安装前需要配置 `.npmrc`，请联系其他研发同学。

```sh
npm install @inf-monkeys/vines
```

### 初始化

```typescript
import { VinesClient } from "@inf-monkeys/vines";

const client = new VinesClient({
  apiKey: "YOUR_VINES_API_KEY",
});
```

### 使用示例

```typescript
import { VinesClient } from "@inf-monkeys/vines";

const client = new VinesClient({
  apiKey: "YOUR_VINES_API_KEY",
});
const workflows = await client.getWorkflowDef({
  workflowId: "64dafc1a73d44c2d8b382e14",
});
```
npm package: @inf3rno/appendable-json
Description: Appendable JSON based format
Author: László Lajos Jánszky
Latest version: 0.1.0

# appendable-json
[![Build Status](https://travis-ci.org/inf3rno/appendable-json.svg?branch=master)](https://travis-ci.org/inf3rno/appendable-json)
Appendable JSON based format

# file format

By storing the following variable:
```js
const example = [
    123,
    "Lorem,\nipsum."
];
```

I started with a JSON array.

```js
[123,"Lorem,\nipsum."]
```

Our main problem with the JSON format, that the square brackets make it hard to append without parsing. So I removed the square brackets.

```
123,"Lorem,\nipsum."
```

This is not bad, we could append it by adding `,"next"`, but I don't like that the first item is different, so I added comma at the end.

```
123,"Lorem,\nipsum.",
```

Now if we want to parse only the second item, then we have a problem to find it without parsing the whole string, because the lorem ipsum string contains a comma.
I added a line break after the separator comma to solve this. Since the compact JSON coming from `JSON.stringify` does not contain any line break, this should suffice.

```
123,
"Lorem,\nipsum.",

```

I like this format, because it is easy to parse and build and it is great for logging or for file based event storages.

# docs

installation

```sh
npm install @inf3rno/appendable-json
```

usage

```js
const aJSON = require("@inf3rno/appendable-json");
```

serialization
```js
const string = aJSON.stringify([{a:1},{b:2},{c:3}]);
const appended = string + aJSON.stringify([{d:4},{e:5}]);
```

unserialization
```js
const array = aJSON.parse(string);
```
npm package: @inf3rno/e2e-testing
Description: DEPRECATED - use @inf3rno/e2e instead
Author: László Lajos Jánszky
Latest version: 0.1.1
Deprecated: Use @inf3rno/e2e instead.

# e2e-testing

Migrated to `@inf3rno/e2e`. This package is deprecated, don't use it.
npm package: @inf3rno/function-parameters
Description: Parsing function parameter list even for ES6 syntax.
Author: László Lajos Jánszky
Latest version: 0.1.0

# function-parameters
[![Build Status](https://travis-ci.org/inf3rno/function-parameters.svg?branch=master)](https://travis-ci.org/inf3rno/function-parameters)
Parsing function parameter list even for ES6 syntax.

```sh
npm install function-parameters
```

implemented in v0.1.0
```js
var parameters = require("function-parameters");
parameters(function (a, b){}); // ["a","b"]
parameters((a,b) => {}); // ["a","b"]
parameters((a,b) => null); // ["a","b"]
parameters((class A{x(a,b){}}).prototype.x); // ["a","b"]
```

todo
```js
var parameters = require("function-parameters");
parameters(([a,b]) => {}); // ["[a,b]"]
parameters(({a,b}) => {}); // ["{a,b}"]
parameters((a, ...b) => {}); // ["a","...b"]
parameters(class A{constructor(a,b){}}); // ["a","b"]
parameters(function (a, b /*, c*/) {}); // ["a","b"]
```
npm package: @inf3rno/patterns
Description: Javascript regex utility
Author: László Lajos Jánszky
Latest version: 0.1.0

# patterns
[![Build Status](https://travis-ci.org/inf3rno/patterns.svg?branch=master)](https://travis-ci.org/inf3rno/patterns)
Parsing function parameter list even for ES6 syntax.

```sh
npm install @inf3rno/patterns
```

```js
var patterns = require("@inf3rno/patterns");
```

**quote**
```js
var pattern = new RegExp(patterns.quote("a-z"));
console.log(pattern.test("a-z")); // true
console.log(pattern.test("abc")); // false
```
npm package: @inf3rno/promise.exposed
Description: Resolving or rejecting Javascript Promise from outside.
Author: László Lajos Jánszky
Latest version: 1.0.2

# Promise.exposed

[![Build Status](https://travis-ci.org/inf3rno/Promise.exposed.svg?branch=master)](https://travis-ci.org/inf3rno/Promise.exposed)

Resolving or rejecting Javascript Promise from outside.

# installation

```sh
npm install @inf3rno/promise.exposed
```

# usage

```js
require("@inf3rno/promise.exposed");
const anExposedPromise = Promise.exposed();
```

or in no-conflict mode:

```js
const createExposedPromise = require("@inf3rno/promise.exposed/noConflict");
const anExposedPromise = createExposedPromise();
```

# examples

We can `resolve` or `reject` the original promise even from its sub-promises created by `then`, `catch` and `finally`.
```js
const promise = Promise.exposed().then(console.log);
promise.resolve("This should show up in the console.");
```

versus

```js
let resolvePromise;
const promise = new Promise(function (resolve, reject){
    resolvePromise = resolve;
}).then(console.log);
resolvePromise("This should show up in the console.");
```

We can create concurrent resolvers without `Promise.race`.
```js
const promise = Promise.exposed(function (resolve, reject){
    setTimeout(function (){
        resolve("I almost fell asleep.")
    }, 100000);
}).then(console.log);

setTimeout(function (){
    promise.resolve("I don't want to wait that much.");
}, 100);
```

versus

```js
const longPromise = new Promise(function (resolve, reject){
    setTimeout(function (){
        resolve("I almost fell asleep.")
    }, 100000);
});
const shortPromise = new Promise(function (resolve, reject){
    setTimeout(function (){
        resolve("I don't want to wait that much.")
    }, 100);
});
Promise.race([longPromise, shortPromise]).then(console.log);
```

We can return the rejected promise (or its sub-promise) if a condition fails without the need of nested functions.

```js
function doThings(){
    const result = Promise.exposed();
    if (Math.random() > 0.5)
        return result.reject(new Error("bad"));
    return result.resolve("good");
}
```

versus

```js
function doThings(){
    return new Promise(function (resolve, reject){
        if (Math.random() > 0.5)
            return reject(new Error("bad"));
        resolve("good");
    });
}
```