Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

json-typescript

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-typescript - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

.nyc_output/03c4905a-8084-4490-8c4c-e9576d76b39a.json

35

package.json
{
"name": "json-typescript",
"version": "1.0.1",
"version": "1.1.0",
"description": "TypeScript type definitions for JSON objects",

@@ -9,3 +9,5 @@ "main": "index.ts",

"lint": "./node_modules/.bin/tslint -p .",
"watch": "./node_modules/.bin/nodemon $(which npm) test"
"watch": "./node_modules/.bin/nodemon $(which npm) test",
"travis-deploy-once": "travis-deploy-once",
"semantic-release": "semantic-release"
},

@@ -27,11 +29,21 @@ "repository": {

"devDependencies": {
"@commitlint/cli": "7.2.1",
"@commitlint/config-conventional": "7.1.2",
"@commitlint/travis-cli": "7.2.1",
"@mike-north/js-lib-renovate-config": "^0.0.1",
"@mike-north/js-lib-semantic-release-config": "^0.0.0-development",
"@types/chai": "^4.0.10",
"@types/mocha": "^2.2.44",
"@types/node": "^10.12.3",
"chai": "^4.1.2",
"chalk": "^2.3.0",
"dtslint": "^0.2.0",
"mocha": "^4.0.1",
"dtslint": "^0.3.0",
"husky": "1.1.2",
"mocha": "^5.0.0",
"mocha-typescript": "^1.1.12",
"nodemon": "^1.17.5",
"ts-node": "^4.0.1",
"nyc": "^13.1.0",
"semantic-release": "^15.10.8",
"travis-deploy-once": "^5.0.9",
"ts-node": "^7.0.1",
"tsconfig": "^7.0.0",

@@ -41,3 +53,16 @@ "tslint": "^5.8.0",

"typings-tester": "^0.3.0"
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"husky": {
"hooks": {
"commit-msg": "./node_modules/.bin/commitlint -e $HUSKY_GIT_PARAMS"
}
},
"release": {
"extends": "@mike-north/js-lib-semantic-release-config"
}
}

18

README.md

@@ -1,5 +0,7 @@

# JSON-typescript <a href="https://travis-ci.org/mike-north/json-typescript" align='right'><img src="https://travis-ci.org/mike-north/json-typescript.svg?branch=master"></a>
# JSON-typescript
TypeScript type information for compile-time validation of [JSON objects](https://www.json.org/).
[![Greenkeeper badge](https://badges.greenkeeper.io/mike-north/json-typescript.svg)](https://greenkeeper.io/)
[![Build Status](https://travis-ci.org/mike-north/json-typescript.svg?branch=master)](https://travis-ci.org/mike-north/json-typescript)
[![Version](https://img.shields.io/npm/v/json-typescript.svg)](https://www.npmjs.com/package/json-typescript)

@@ -15,3 +17,3 @@ ## How to use this

```ts
import _JSON from 'json-typescript';
import * as _JSON from 'json-typescript';
```

@@ -22,6 +24,6 @@

```ts
import _JSON from 'json-typescript';
import * as { Value as JSONValue, Object as JSONObject } from 'json-typescript';
// ✅ This should be OK
let doc: _JSON.Value = {
let doc: JSONValue = {
data: {

@@ -34,3 +36,3 @@ type: 'articles',

// ⛔️ This should NOT be OK ( functions are not allowed )
let doc: _JSON.Value = {
let doc: JSONValue = {
foo() {

@@ -41,4 +43,4 @@ return bar;

// ⛔️ This should NOT be OK ( Array is not a JSON.Object )
let doc: _JSON.Object = [];
// ⛔️ This should NOT be OK ( Array is not a JSONObject )
let doc: JSONObject = [];
```

@@ -45,0 +47,0 @@

@@ -8,2 +8,3 @@ {

"no-misused-new": false,
"file-name-casing": false,

@@ -10,0 +11,0 @@ // these are disabled because of rfc176 module exports

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc