https://github.com/aranajhonny/is-next-server
check if next.js is running on server or client.
https://github.com/aranajhonny/is-next-server
javascript nextjs server
Last synced: about 2 months ago
JSON representation
check if next.js is running on server or client.
- Host: GitHub
- URL: https://github.com/aranajhonny/is-next-server
- Owner: aranajhonny
- Created: 2017-06-14T16:30:50.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-14T17:52:42.000Z (about 9 years ago)
- Last Synced: 2024-12-28T17:52:41.370Z (over 1 year ago)
- Topics: javascript, nextjs, server
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#### Check if next.js is running on server or client.
#### usage:
```javascript
const isServer = require("is-next-server");
export default () => (
if (isServer) {
// server code.
} else {
// browser code.
}
)
```