-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for Next.JS edge runtime (#136)
* test: add a test for Next.JS middleware edge runtime * feat: add support for Next.JS edge runtime * 2.3.0
- Loading branch information
Showing
4 changed files
with
15 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
module.exports = function isA(item, constructor) { | ||
if (constructor === Array) { | ||
return Array.isArray(item); | ||
} | ||
|
||
if (constructor === Object) { | ||
return item !== null && typeof item === 'object' && Array.isArray(item) !== true; | ||
} | ||
|
||
return item && item.constructor === constructor; | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "ycb", | ||
"version": "2.2.0", | ||
"version": "2.3.0", | ||
"description": "YCB is a multi-dimensional configuration library that builds bundles from resource files describing a variety of values.", | ||
"author": "Ric Allinson <[email protected]>", | ||
"license": "BSD", | ||
|
@@ -16,7 +16,8 @@ | |
"lint": "eslint . && prettier --check .", | ||
"lint:fix": "eslint . --fix && prettier --write .", | ||
"pretest": "npm run lint", | ||
"test": "mocha tests/unit --recursive --reporter spec" | ||
"test": "mocha tests/unit --recursive --reporter spec", | ||
"posttest": "node -r ./tests/edgeRuntime.js ./node_modules/.bin/mocha tests/unit --recursive --reporter spec" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^9.0.0", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
globalThis.Array = new Proxy(Array, {}); | ||
globalThis.Object = new Proxy(Object, {}); |