🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@kenyip/joi

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kenyip/joi - npm Package Compare versions

Comparing version
0.0.3
to
0.0.4
+1
-1
package.json
{
"name": "@kenyip/joi",
"description": "Object schema validation",
"version": "0.0.3",
"version": "0.0.4",
"homepage": "https://github.com/hapijs/joi",

@@ -6,0 +6,0 @@ "repository": "git://github.com/hapijs/joi",

+25
-25

@@ -7,3 +7,3 @@ # @kenyip/joi

```sh
```shell
// Using NPM

@@ -24,4 +24,4 @@ $ npm i @kenyip/joi --save

const object = Joi.object({
hello: Joi.string(),
world: Joi.string()
hello: Joi.string(),
world: Joi.string()
});

@@ -32,11 +32,11 @@

// {
// "type": "object",
// "properties": {
// "hello": {
// "type": "string"
// },
// "world": {
// "type": "string"
// }
// }
// "type": "object",
// "properties": {
// "hello": {
// "type": "string"
// },
// "world": {
// "type": "string"
// }
// }
// }

@@ -50,9 +50,9 @@ ```

const objectA = Joi.object({
hello: Joi.string(),
world: Joi.string(),
hello: Joi.string(),
world: Joi.string(),
});
const objectB = objectA
.keys({ foo: Joi.string() })
.remove(["hello"]);
.keys({ foo: Joi.string() })
.remove(["hello"]);

@@ -62,12 +62,12 @@ console.log(JSON.stringify(objectB.toSwagger(), null, 4));

// {
// "type": "object",
// "properties": {
// "world": {
// "type": "string"
// },
// "foo": {
// "type": "string"
// }
// }
// "type": "object",
// "properties": {
// "world": {
// "type": "string"
// },
// "foo": {
// "type": "string"
// }
// }
// }
```