@docusaurus/core
Version:
Easy to Maintain Open Source Documentation Websites
19 lines (18 loc) • 514 B
TypeScript
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import type { ChunkNames } from '@docusaurus/types';
/**
* Takes a tree, and flattens it into a map of keyPath -> value.
*
* ```js
* flat({ a: { b: 1 } }) === { "a.b": 1 };
* flat({ a: [1, 2] }) === { "a.0": 1, "a.1": 2 };
* ```
*/
export default function flat(target: ChunkNames): {
[keyPath: string]: string;
};