lieko-express 1.0.21 → 1.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lieko-express.js +11 -4
  2. package/package.json +1 -1
package/lieko-express.js CHANGED
@@ -449,6 +449,17 @@ class LiekoExpress {
449
449
  all(path, ...handlers) { return this._call('all', path, handlers); },
450
450
 
451
451
  use(pathOrMw, ...rest) {
452
+
453
+ if (Array.isArray(pathOrMw)) {
454
+ pathOrMw.forEach(p => {
455
+ if (typeof p !== 'string') {
456
+ throw new Error('group.use() array must contain only strings');
457
+ }
458
+ this.use(p, ...rest);
459
+ });
460
+ return subApp;
461
+ }
462
+
452
463
  if (typeof pathOrMw === 'object' && pathOrMw instanceof LiekoExpress) {
453
464
  const finalPath = fullBase === '/' ? '/' : fullBase;
454
465
  parent.use(finalPath, ...middlewares, pathOrMw);
@@ -1610,10 +1621,6 @@ ${cyan} (req, res, next) => {
1610
1621
  return res.status(201).json({ data, message });
1611
1622
  };
1612
1623
 
1613
- res.notModified = () => {
1614
- return res.status(304).end();
1615
- };
1616
-
1617
1624
  res.noContent = () => {
1618
1625
  return res.status(204).end();
1619
1626
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lieko-express",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/eiwSrvt/lieko-express"