UNPKG

webpack-plugin-ramdisk

Version:

🐏 A webpack plugin for blazing fast builds on a RAM disk / drive

28 lines (22 loc) 727 B
/* Copyright © 2019 Andrew Powell This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. The above copyright notice and this permission notice shall be included in all copies or substantial portions of this Source Code Form. */ const Joi = require('@hapi/joi'); const { number, object, string, validate } = Joi.bind(); module.exports = { validate(options) { const keys = { blockSize: number(), bytes: number(), name: string() }; const schema = object().keys(keys); const results = validate(options, schema); return results; } };