# h-ts

> Typescript Helpers

Latest version **1.0.91** (published 2019-02-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install h-ts
pnpm add h-ts
yarn add h-ts
bun add h-ts
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.91 |
| Published | 2019-02-17 |
| First published | 2018-02-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 470.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | benjaminjackman |
| Maintainers | benjaminjackman |
| Keywords | ash9g, typescript |

## Links

- npm: https://www.npmjs.com/package/h-ts
- npm.io page: https://npm.io/package/h-ts

## Dependencies (1)

- [h-ts](https://npm.io/package/h-ts.md) ^1.0.81

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.0.91 (latest) — 2019-02-17
- 1.0.90 — 2019-02-15
- 1.0.89 — 2019-02-15
- 1.0.88 — 2019-02-15
- 1.0.87 — 2019-01-23
- 1.0.86 — 2019-01-23
- 1.0.85 — 2019-01-18
- 1.0.84 — 2019-01-18
- 1.0.83 — 2019-01-18
- 1.0.82 — 2019-01-17
- 1.0.81 — 2019-01-15
- 1.0.80 — 2019-01-15
- 1.0.79 — 2019-01-13
- 1.0.78 — 2019-01-10
- 1.0.77 — 2019-01-03
- … 72 more at https://npm.io/package/h-ts/versions

## README

# Helpers for typescript
(documentation, wip)


## export {AnyHelp} from "./AnyHelp";
    helpers that work on any type e.g.
    isNotNull
## export {ArrayHelp} from "./ArrayHelp"
    helpers for array, better typesafety for higher order function array helpers
## export {ObjectHelp} from "./ObjectHelp"
    helper for object
## export {EQ, EQ_NS} from "./Equality"
## export {KeySet} from "./KeySet"
## export {MapHelp} from "./MapHelp"
## export {WebHelp} from "./WebHelp"
## export {Global} from "./Global"
## export {ChunkedIterate} from "./ChunkedIterate"
## export {Decorators} from "./Decorators"
## export {TypeHelp} from "./TypeHelp"
## export {StringHelp} from "./StringHelp"
## export {FunctionHelp} from "./FunctionHelp"
## export {ProxyHelp} from "./ProxyHelp"
## export {Ided, Idify} from "./Ided"
  a way to DRYly write an object whose properties use the key they are assigned to in their own initialization

    type Color<T extends string> = {name: T}
    const colors = {
      ...Ided.byName({name: "red"}),
      ...Ided.byName({name: "green"}),
    }
    //Colors will have the type:
    {red: {name: "red"}, {green: {name: "green"}}
## export {Heap} from "./Heap"
  a simple heap implementation
## export {YoconHelp} from "./yocon/YoconHelp"
  a work in progress port of the 
## export {StringEnum, Enum} from "./Enum"
  better versions of enums


## export * from "./TopLevelExports"
<hr/>

### export function createRecord
    function createRecord<T extends object>(obj: T,): T extends object ? Record<keyof T, TypeHelp.ValueType<T>> : never {
      return obj as any
    }

### export const unreachable = LangHelp.unreachable
### export const isNotNull = AnyHelp.isNotNull
### export const augment = AnyHelp.augment
### export const createKeySet = KeySet.create
### export const createPrefixedKeySet = KeySet.createPrefixed
### export const iife = <T>(f : () => T) : T => f()
    //iife = immediately invoked function expression, useful to avoid having to add extra parens
    iife(() => x + 1) // invokes immediately
    
    (() => x + 1)()//Lines starting with a `(` are Problematic without explicit semicolons
    //Consider
    const y = 1
    const x = y
    (() => x + 1)()
    //This will be interpreted as
    const y = 1
    const x = y(() => x + 1)()

    

### export const ensure = TypeHelp.ensure
### export const ensureValue = TypeHelp.ensureValue
### export const literal = TypeHelp.literal
### export const infer = TypeHelp.infer
### export const cast = TypeHelp.cast
### export const cast_any = TypeHelp.cast_any
### export const tuple = TypeHelp.tuple
### export const memo = Decorators.memo
### export const cache = Decorators.cache



## export * from "./TopLevelTypes"
<hr/>

### export type Id<T> = TypeHelp.Id<T>
### export type PropsOf<T> = TypeHelp.PropsOf<T>
### export type UnionToIntersection<U> = TypeHelp.UnionToIntersection<U>
### export type UnionFromArray<T extends any[]> = TypeHelp.UnionFromArray<T>
### export type IntersectionFromArray<T extends any[]> = TypeHelp.IntersectionFromArray<T>
### export type StringMap<T> = TypeHelp.StringMap<T>
### export type Readyonly<T> = TypeHelp.Readyonly<T>
### export type Diff<T extends keyof any, U extends keyof any> = TypeHelp.Diff<T, U>
### export type Omit<T, K extends keyof T> = TypeHelp.Omit<T, K>
### export type Replace<T, K extends keyof T, V> = TypeHelp.Replace<T, K, V>
### export type DeepPartial<T> = TypeHelp.DeepPartial<T>
### export type KeyType<T extends object> = keyof T
### export type ValueType<T extends object> = T[keyof T]

---
_Source: https://npm.io/package/h-ts · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
