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

@eik/common

Package Overview
Dependencies
Maintainers
4
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eik/common - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

7

CHANGELOG.md

@@ -0,1 +1,8 @@

## [1.0.1](https://github.com/eik-lib/common/compare/v1.0.0...v1.0.1) (2020-09-10)
### Bug Fixes
* loosen validation ([ea00919](https://github.com/eik-lib/common/commit/ea00919fcfb1ef7e0dd277e0e06525fd467834cf))
# 1.0.0 (2020-09-08)

@@ -2,0 +9,0 @@

9

lib/schemas/eikjson.schema.json

@@ -26,8 +26,4 @@ {

"minProperties": 1,
"propertyNames": {
"pattern": "^[\\./a-z_-][\\./a-z0-9_-]*$"
},
"additionalProperties": {
"type": "string",
"pattern": "^[\\./a-z_-][\\./a-z0-9_-]*$"
"type": "string"
}

@@ -44,4 +40,3 @@ },

"format": "uri"
},
"minItems": 1
}
}

@@ -48,0 +43,0 @@ ]

{
"name": "@eik/common",
"version": "1.0.0",
"version": "1.0.1",
"description": "Common utilities for Eik modules",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -9,13 +9,62 @@ # Eik Commons

#### assets
#### eik.json
Importing schemas
```js
const { schemas } = require('@eik/common');
```
const { error, value } = schemas.assets({
organisation: 'my-org',
Validating an `eik.json` file
```js
const { error, value } = schemas.validate.eikJSON({
name: 'my-app',
version: '1.0.0',
server: 'http://eik-server',
files: [],
});
```
Using invididual schema validators
##### name
```js
const { error, value } = schemas.validate.name('my-app');
```
##### version
```js
const { error, value } = schemas.validate.version('1.0.0');
```
##### server
```js
const { error, value } = schemas.validate.server('http://myeikserver.com');
```
##### files
```js
const { error, value } = schemas.validate.files({
'./index.js': '/path/to/file.js'
});
```
##### import map
```js
const { error, value } = schemas.validate.importMap('http://meserver.com/map.json');
const { error, value } = schemas.validate.importMap([
'http://meserver.com/map1.json',
'http://meserver.com/map2.json',
]);
```
##### out
```js
const { error, value } = schemas.validate.out('./.eik');
```
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