open-index/open-npm huggingface dataset:
npm package: @superhuit/starterpack-editor
Description: Starterpack's components and hooks for WP Editor.
Author: superhuit
Latest version: 2.6.6

# `Starterpack Editor`

> Starterpack's components and hooks for WP Editor

## Usage

```
import { PanelDesign } from '@superhuit/starterpack-editor;
```

## Components

-   PostsSelectControl
-   TermsSelectControl
-   PreviewBlockImage
-   PanelDesign

## Hooks

-   useAcfField
-   useGraphQlApi
-   useIsPostType
-   useLocale
-   usePosts
-   useRestAPI
-   useTerms

## Constants

-   PAGE_PT_NAME
-   POST_PT_NAME
-   TAG_TAX_NAME
-   CATEGORY_TAX_NAME
-   WP_TERM_REST
-   WP_POST_REST
-   WP_MEDIA_REST

## Utils

-   getImagePromise
-   escapeHTML
npm package: @superhuit/starterpack-perfs-tester
Description: An utility package to test performances of your application's parts
Author: superhuit
Latest version: 0.0.5-2

# Perfs Tester

An utility package to test performances of your application's parts

## Requirements

-   [node](https://nodejs.org/) = lts/hydrogen (v18.x)

## Getting started

### Setup

Add `perf_hooks: false,` to next.config.js file in webpack resolve fallback property

```js
// [...]
webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => {
    config.resolve.plugins.push(new TsconfigPathsPlugin());
    config.resolve = {
        ...config.resolve,
        fallback: {
            ...config.resolve.fallback,
            perf_hooks: false, // <== Add here
        },
    };
// [...]
```

### Usage

1. Import the package

```js
import Benchmark from '@superhuit/starterpack-perfs-tester';
```

#### Simple

Mark timing segments in your application

1. Start a performance test
1. Mark timings
1. Report

```js
const perfsTester = PerfsTester();

// application logic 1
perfsTester.mark('logic 1');

// application logic 2
perfsTester.mark('logic 2');

// application logic 3
perfsTester.mark('logic 3');

// application logic 4
perfsTester.mark('logic 4');

perfsTester.report('Application logics');
```

#### Specific

Test sepecific blocks performances

1. Start a performance test
1. Mark start of block
1. End block test
1. Report

```js
function foo() {
	const testFooId = perfsTester.markStart('function Foo');

	// do something heavy

	perfsTester.markEnd(testFooId);
}

const perfsTester = PerfsTester();

foo();

perfsTester.report();
```