npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

nti-easydt-utils

v0.1.1

Published

`EasyDT` 数字孪生平台工具类库

Readme

nti-easydt-utils

EasyDT 数字孪生平台工具类库


安装

npm i nti-easydt-utils

导入

import { Datasource } from 'nti-easydt-utils'

utils

Datasource

static getFields(req: Req): Promise<Res>

根据数据集ID,获取 度量维度 字段信息

interface Req {
  datasetID: string                     // 数字孪生平台 数据集ID
  env: number                           // 数字孪生平台 环境(0-开发 1-测试 2-生产 3-nti内网 4-nti外网 5-私有部署)
  token: string                         // 数字孪生平台 用户凭证
  orderByItem?: OrderByItem[]           // SQL排序
  whereParameters?: WhereParameters[]   // SQL条件
  queryStr?: string                     // SQL条件
}

interface Res {
  header: Header[]
  list: Body[]
}
interface WhereParameters {
  name?: string             // 字段名
  dateType?: string         // 字段类型(暂时都用VARCHAR)
  condition?: Condition[]   // 条件
}

interface Condition {
  value?: number
  connector?: string    // 1-且 2-或
  relation?: string
}

interface OrderByItem {
  field?: string    // 排序字段
  order?: string    // asc-升序 desc-降序 null-原序
}

interface Header {
  tableName: string | null
  columnName: string
  dataType: number
  originalDataType: number | null
  columnComment: string | null
  columnSize: number | null
}

interface Body {
  [key: string]: string
}