is-next-server

1.0.0 • Public • Published

Check if next.js is running on server or client.

usage:

 
const isServer = require("is-next-server");
 
export default () => (
  if (isServer) {
    // server code.
  } else {
    // browser code.
  }
)

Package Sidebar

Install

npm i is-next-server

Weekly Downloads

8

Version

1.0.0

License

MIT

Last publish

Collaborators

  • aranajhonny