Socket
Book a DemoInstallSign in
Socket

types-pkg-json

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

types-pkg-json

Type checking for package.json

1.2.1
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

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

  • types-json: Type checking for JSON objects
  • types-eslintrc: Type checking for .eslintrc.json

Dev DependenciesDavid

License license

MIT


Keywords

type

FAQs

Package last updated on 09 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.