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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@dusky/test-plugin

v0.0.1

Published

javascript language extension

Downloads

2

Readme

hjc-buildin

说明:hjc-buildin是对typescript原有语言的方法扩展集,是hjc-client和hjc-server的必要依赖库。

ES6 + hjc-buildin

  • es6原生常用函数
  • hjc-buildin扩展内容

全局

扩充定义

  • 数值 index hashcode percent timer
  • 颜色 color
  • 几何 angle radian vector2 vector3
  • 时间 second millisecond minute
  • 类型 Dictionary lambda
  • 类定义 Clazz(s) SubClazz(s)

常用判断

  • 数值 isNumber
  • 数组 isArray
  • 函数 isFunc
  • 字符 isString
  • 布尔 isBool
  • 判空 isEmpty
  • 非空 notEmpty
  • 颜色 isColor
  • 非空数组 notEmptyArr
  • 有定义 isDefined

Object

原型 Object.

  • 判等 is
  • 构建 create assign fromEntries
  • 键值 keys values entries
  • 深取 deepGet
  • 拷贝 shallow/deepClone
  • 原型 getPropertyOf
  • 属性 freeze/isFrozen seal/isSealed

实例 obj.

  • 含有 hasOwnerProperty has[Own]Func
  • 调用 callFunc
  • 转化 to[Local]String

Array

原型 Array.

  • 构建 from fill nature enumKeys/Values
  • 判断 isArray

实例 arr.

  • 构建 concat
  • 迭代 forEach filter map every some reduce[Right]
  • 判断 includes contains[InsOf] excludes allInsOf all notAll
  • 取值 slice indexOf find[Index] head(s) tail(s) loopAt
  • 随洗 random shuffle swingCut
  • 插换 push unshift splice insert pushUnique unshiftUnique exchange
  • 删改 pop shift delete remove
  • 排序 sort reverse asc desc descBy
  • 集合 copy unique merge union intersect difference part

Number

  • 转换 parseInt/Float
  • 判断 isFinite isNaN isInteger isPositive notNegtive isPosInt isPercent
  • 取舍 toPercision

Math

  • 随机 random randomRange/Int/Bool
  • 转换 parseAngle/Radian
  • 比较 max min
  • 取舍 round ceil floor trunc
  • 求值 abs pow exp log sqrt sum sqrSum avg

String

  • 转换 toLower/UpperCase
  • 补替 replace repeat split
  • 补齐 padStart/End padLeft/Right
  • 取舍 toFixed trim[Start/End]
  • 拆合 join concat
  • 取值 char[Code]At substr substring slice
  • 判断 starts/endsWith contains
  • 内容 chinese/english/numeric validPswd/Nick
  • 属性 ulength

Reflect

  • 调用 construct apply
  • 属性 has get set delete/defineProperty
  • 原型 get/setPrototypeOf

Promise

  • 基本 async await resolve reject
  • 流程 then catch finally
  • 控制 all race allSettled any

Json

  • 转换 parse stringify