@sveltek/markdown
Version:
Svelte Markdown Preprocessor.
72 lines (70 loc) • 1.42 kB
JavaScript
//#region src/shared/meta.ts
const meta = {
name: "svelte-markdown",
layoutName: `Markdown__Layout`,
componentName: `Markdown__Component`
};
//#endregion
//#region ../../node_modules/.pnpm/@hypernym+utils@3.4.6_@types+node@24.10.4_typescript@5.9.3/node_modules/@hypernym/utils/dist/index.js
/**
* Returns a string representing the object.
*
* @example
*
* ```ts
* import { toString } from '@hypernym/utils'
*
* toString({}) // 'Object'
* ```
*/
const toString = (v) => Object.prototype.toString.call(v).slice(8, -1);
/**
* Returns a boolean if the given value is a `string`.
*
* @example
*
* ```ts
* import { isString } from '@hypernym/utils'
*
* isString('@hypernym/utils') // true
* ```
*/
const isString = (v) => typeof v === "string";
/**
* Returns a boolean if the given value is a `false`.
*
* @example
*
* ```ts
* import { isFalse } from '@hypernym/utils'
*
* isFalse(false) // true
* ```
*/
const isFalse = (v) => v === false;
/**
* Returns a boolean if the given value is a `array`.
*
* @example
*
* ```ts
* import { isArray } from '@hypernym/utils'
*
* isArray([]) // true
* ```
*/
const isArray = (v) => Array.isArray(v);
/**
* Returns a boolean if the given value is a `object`.
*
* @example
*
* ```ts
* import { isObject } from '@hypernym/utils'
*
* isObject({}) // true
* ```
*/
const isObject = (v) => toString(v) === "Object";
//#endregion
export { isArray, isFalse, isObject, isString, meta };