Browse Source

Bump `@sindresorhus/is`

iss58
Sindre Sorhus 7 years ago
parent
commit
764173c9cf
  1. 6
      package.json
  2. 2
      source/lib/argument-error.ts
  3. 2
      source/lib/predicates/array.ts
  4. 2
      source/lib/predicates/number.ts
  5. 2
      source/lib/predicates/predicate.ts

6
package.json

@ -10,7 +10,6 @@
"url": "sindresorhus.com"
},
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"engines": {
"node": ">=4"
},
@ -18,7 +17,7 @@
"prerelease": "npm run build",
"pretest": "npm run compile -- --sourceMap",
"test": "npm run lint && nyc ava dist/test",
"lint": "tslint --project .",
"lint": "tslint --format stylish --project .",
"build": "npm run clean && webpack",
"compile": "npm run clean && tsc",
"clean": "del dist"
@ -47,7 +46,7 @@
"object"
],
"devDependencies": {
"@sindresorhus/is": "^0.4.0",
"@sindresorhus/is": "^0.5.0",
"@types/node": "^8.0.31",
"ava": "*",
"awesome-typescript-loader": "^3.2.3",
@ -62,6 +61,7 @@
"vali-date": "^1.0.0",
"webpack": "^3.8.1"
},
"typings": "dist/index.d.ts",
"nyc": {
"exclude": [
"dist/test"

2
source/lib/argument-error.ts

@ -1,5 +1,5 @@
export class ArgumentError extends Error {
constructor(message, context) {
constructor(message: string, context: Function) {
super(message);
// TODO: Node does not preserve the error name in output when using the below, why?
Error.captureStackTrace(this, context);

2
source/lib/predicates/array.ts

@ -129,7 +129,7 @@ export class ArrayPredicate extends Predicate<any[]> {
* @param predicate The predicate that should be applied against every individual item.
*/
ofType<T>(predicate: Predicate<T>) {
let error;
let error: string;
return this.addValidator({
message: () => error,

2
source/lib/predicates/number.ts

@ -1,4 +1,4 @@
import * as is from '@sindresorhus/is';
import is from '@sindresorhus/is';
import {Predicate, Context} from './predicate';
export class NumberPredicate extends Predicate<number> {

2
source/lib/predicates/predicate.ts

@ -1,4 +1,4 @@
import * as is from '@sindresorhus/is';
import is from '@sindresorhus/is';
import {not} from '../operators/not';
export interface Validator<T> {

Loading…
Cancel
Save