New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@zenweb/cors

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zenweb/cors - npm Package Compare versions

Comparing version 1.1.0 to 2.0.0

1

index.d.ts
import { Options } from '@koa/cors';
import { Core } from '@zenweb/core';

@@ -3,0 +4,0 @@ export type CorsOptions = Options;

14

index.js

@@ -1,15 +0,9 @@

'use strict';
import cors from '@koa/cors';
const debug = require('debug')('zenweb:cors');
const cors = require('@koa/cors');
/**
* @param {import('zenweb').Core} core
* @param {import('@zenweb/core').Core} core
* @param {object} [options]
*/
function setup(core, options) {
debug('options: %o', options);
core.koa.use(cors(options));
export function setup(core, options) {
core.use(cors(options));
}
module.exports = setup;
{
"name": "@zenweb/cors",
"version": "1.1.0",
"version": "2.0.0",
"description": "zenweb cors module",
"main": "index.js",
"type": "module",
"exports": "./index.js",
"engines": {
"node": ">=16.0.0"
},
"typings": "index.d.ts",
"files": [
"index.js",
"index.d.ts"
],
"scripts": {

@@ -28,9 +37,8 @@ "lint": "eslint . --max-warnings 0",

"devDependencies": {
"eslint": "^7.16.0",
"zenweb": "^1.0.1"
"@zenweb/core": "^2.0.1",
"eslint": "^7.16.0"
},
"dependencies": {
"@koa/cors": "^3.1.0",
"debug": "^4.3.1"
"@koa/cors": "^3.1.0"
}
}

@@ -12,15 +12,7 @@ # zenweb-cors

```js
'use strict';
const app = module.exports = require('zenweb').create();
app.setup('@zenweb/cors', {
origin: '*',
export const app = create({
cors: {
origin: '*',
}
});
app.router.get('/', ctx => {
ctx.body = 'ok';
});
app.start();
```
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