teable/packages/core
2024-03-25 22:22:44 +08:00
..
src chore: add licenses for non-NPM packages (#495) 2024-03-25 22:22:44 +08:00
.escheckrc refactor: rename ts-utils to core 2022-12-13 14:45:46 +08:00
.eslintrc.cjs chore: rename (#356) 2024-01-30 22:20:05 +08:00
.gitignore feat: formula parser by antlr4 2023-04-28 17:37:41 +08:00
.size-limit.cjs refactor: rename ts-utils to core 2022-12-13 14:45:46 +08:00
lint-staged.config.js chore: rename (#356) 2024-01-30 22:20:05 +08:00
package.json chore: husky to v9 and upgrade more deps (#494) 2024-03-25 20:12:12 +08:00
README.md chore: rename (#356) 2024-01-30 22:20:05 +08:00
tsconfig.build.json feat: release packages prepare (#477) 2024-03-20 19:03:52 +08:00
tsconfig.eslint.json fix: aggregation & chore: upgrade dependencies (#236) 2023-11-01 16:52:17 +08:00
tsconfig.json feat: release packages prepare (#477) 2024-03-20 19:03:52 +08:00
vitest.config.ts fix: vitest coverage.reporter config (#469) 2024-03-19 18:17:52 +08:00
vitest.setup.js test: change packages from jest to vitest (#309) 2023-12-25 17:45:12 +08:00

@teable/core

Note

This package is part of teableio/teable.

A package holding some basic typescript utilities: typeguards, assertions...

  • Packaged as ES module (type: module in package.json).
  • Can be build with tsup (no need if using tsconfig aliases).
  • Simple unit tests demo with either Vitest (pnpm test-unit) or TS-Jest (pnpm test-unit-jest).

Install

From any package or apps:

yarn add @teable/core@"workspace:^"

Enable aliases

{
  //"extends": "../../tsconfig.base.json",
  "compilerOptions": {
    "baseUrl": "./src",
    "paths": {
      "@teable/core": ["../../../packages/core/src/index"],
    },
  },
}

Consume

import { isPlainObject } from "@teable/core";

isPlainObject(true) === false;