types-pkg-json
Type checking for package.json
Last updated 4 years ago by bconnorwhite .
MIT · Repository · Original npm · Tarball · package.json
$ gnpm install types-pkg-json 
SYNC missed versions from official npm registry.

types-pkg-json

NPM TypeScript Coverage Status GitHub Stars Twitter Follow

Type checking for package.json.

Derived from type-fest with a focus on package.json types.

Installation

yarn add types-pkg-json
npm install types-pkg-json

API

Types

import { PackageJSON, fileName, PackageJSONFileName } from "types-pkg-json"; // Type for NPM's package.json file

console.log(fileName); // "package.json"

Field Types

import {
  BugsLocation, // Used by the `bugs` field.
  LicenseID, // Used by the `license` and `licenses.type` fields.
  Person, // Used by the `author`, `contributors`, and `maintainers` fields.
  DirectoryLocations, // Used by the `directories` field.
  Repository, // Used by the `repository` field.
  Scripts, // Used by the `scripts` field.
  Dependencies // Used by the `dependencies`, `devDependencies`, `optionalDependencies`, and `peerDependencies` fields.
} from "types-pkg-json";

Configuration Types

import {
  NonStandardEntryPoints, // module, esnext, browser, sideEffects
  TypeScriptConfiguration, // types, typings
  WorkspaceConfig, // packages, nohoist
  YarnConfiguration, // workspaces, flat, resolutions
  JSPMConfiguration, // jspm
  ESLintConfiguration // eslintConfig
} from "types-pkg-json";

Utility Types

import {
  isJSONObject
  JSONObject,
  JSONValue,
  JSONArray,
  Primitive,
  LiteralUnion
} from "types-pkg-json";

function isJSONObject(object?: JSONValue): object is JSONObject;

Dependenciesdependencies


Dev DependenciesDavid

License license

MIT


Related Projects

Current Tags

  • 1.2.1                                ...           latest (4 years ago)

7 Versions

  • 1.2.1                                ...           4 years ago
  • 1.1.2                                ...           4 years ago
  • 1.1.1                                ...           4 years ago
  • 1.1.0                                ...           4 years ago
  • 1.0.2                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (1)

Copyright 2013 - present © cnpmjs.org | Home |