@zenweb/body
Advanced tools
| import { Core } from '@zenweb/core'; | ||
| import * as koaBody from 'koa-body'; | ||
| export { IKoaBodyOptions as BodyOption } from 'koa-body'; | ||
| export declare function setup(core: Core, options?: koaBody.IKoaBodyOptions): void; |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.setup = void 0; | ||
| const koaBody = require("koa-body"); | ||
| function setup(core, options) { | ||
| core.use(koaBody(options)); | ||
| } | ||
| exports.setup = setup; | ||
| //# sourceMappingURL=index.js.map |
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,oCAAoC;AAGpC,SAAgB,KAAK,CAAC,IAAU,EAAE,OAAiC;IACjE,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;AAC7B,CAAC;AAFD,sBAEC"} |
| import { Core } from '@zenweb/core'; | ||
| import * as koaBody from 'koa-body'; | ||
| export { IKoaBodyOptions as BodyOption } from 'koa-body'; | ||
| export function setup(core: Core, options?: koaBody.IKoaBodyOptions) { | ||
| core.use(koaBody(options)); | ||
| } |
| { | ||
| "compilerOptions": { | ||
| "target": "ES2019", | ||
| "lib": [ | ||
| "ES2019" | ||
| ], | ||
| "module": "commonjs", | ||
| "noImplicitAny": true, | ||
| "preserveConstEnums": true, | ||
| "sourceMap": true, | ||
| "declaration": true, | ||
| "outDir": "./dist" | ||
| }, | ||
| "exclude": [ | ||
| "node_modules", | ||
| "**/*.spec.ts" | ||
| ], | ||
| "include": [ | ||
| "src/**/*" | ||
| ] | ||
| } |
+6
-5
| { | ||
| "name": "@zenweb/body", | ||
| "version": "1.1.0", | ||
| "version": "2.0.0", | ||
| "description": "Zenweb Body module", | ||
| "main": "index.js", | ||
| "exports": "./dist/index.js", | ||
| "typings": "./dist/index.d.ts", | ||
| "scripts": { | ||
| "prepublishOnly": "tsc", | ||
| "test": "echo \"Error: no test specified\" && exit 1" | ||
@@ -29,5 +31,4 @@ }, | ||
| "devDependencies": { | ||
| "@zenweb/core": "^1.0.0", | ||
| "eslint": "^7.16.0", | ||
| "koa": "^2.13.1" | ||
| "@types/koa": "^2.13.4", | ||
| "@zenweb/core": "^2.1.1" | ||
| }, | ||
@@ -34,0 +35,0 @@ "dependencies": { |
-14
| { | ||
| "extends": "eslint:recommended", | ||
| "env": { | ||
| "node": true, | ||
| "es6": true | ||
| }, | ||
| "parserOptions": { | ||
| "ecmaVersion": 8 | ||
| }, | ||
| "rules": { | ||
| "no-unused-vars": ["warn", { "vars": "local", "args": "none" }], | ||
| "semi": "warn" | ||
| } | ||
| } |
| import { Core } from '@zenweb/core'; | ||
| import { IKoaBodyOptions } from 'koa-body'; | ||
| export { IKoaBodyOptions } from 'koa-body'; | ||
| export declare function setup(core: Core, options?: IKoaBodyOptions): void; |
-15
| 'use strict'; | ||
| const koaBody = require('koa-body'); | ||
| /** | ||
| * @param {import('@zenweb/core').Core} core | ||
| * @param {*} [options] | ||
| */ | ||
| function setup(core, options) { | ||
| core.koa.use(koaBody(options)); | ||
| } | ||
| module.exports = { | ||
| setup, | ||
| }; |
2178
51.78%2
-33.33%7
40%38
137.5%