Skip to content

v1.0.0

Latest

Choose a tag to compare

@pine pine released this 24 Dec 03:22
· 8 commits to main since this release
24046d0

Breaking changes

Use named export instead of CJS default exports

To update the package from v0.2.6 to v1.0.0, your code needs to be changed.

v0.2.6 or earlier

const os = require('os')
const isLo = require('is-lo') // default export

const interfaces = os.networkInterfaces()
const names = Object.keys(interfaces)

console.log(isLo(interfaces[names[0]]))

v1.0.0

ESModules

import os from 'node:os'
import { isLo } from 'is-lo' // named export

const interfaces = os.networkInterfaces()
const names = Object.keys(interfaces)

console.log(isLo(interfaces[names[0]]))

CommonJS

const os = require('node:os')
const { isLo } = require('is-lo') // named export

const interfaces = os.networkInterfaces()
const names = Object.keys(interfaces)

console.log(isLo(interfaces[names[0]]))

Major changes

  • Supports TypeScript
  • Supports both CommonJS and ESModules