# construct-new-second

> alternative version of construct-new

Latest version **1.0.1** (published 2026-01-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install construct-new-second
pnpm add construct-new-second
yarn add construct-new-second
bun add construct-new-second
```

## Health

**Score 45/100 (D)** — status: stable.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2026-01-27 |
| First published | 2026-01-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 14 |
| Unpacked size | 6.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | me |
| Maintainers | tj-commits |
| Keywords | construct |

## Links

- npm: https://www.npmjs.com/package/construct-new-second
- Repository: https://github.com/enterprise-npm-ai/construct-new-second
- Homepage: https://github.com/enterprise-npm-ai/construct-new-second#readme
- Issues: https://github.com/enterprise-npm-ai/construct-new-second/issues
- npm.io page: https://npm.io/package/construct-new-second

## Dependencies (14)

- [uncurry-x](https://npm.io/package/uncurry-x.md) ^1.0.1
- [is-array-like](https://npm.io/package/is-array-like.md) ^1.1.2
- [is-nonpresent](https://npm.io/package/is-nonpresent.md) ^1.0.0
- [immediate-error](https://npm.io/package/immediate-error.md) ^2.0.0
- [n0p3-es2015-cjs](https://npm.io/package/n0p3-es2015-cjs.md) ^1.0.1
- [function.apply-x](https://npm.io/package/function.apply-x.md) ^1.0.0
- [is-constructable](https://npm.io/package/is-constructable.md) ^1.0.0
- [lodash.stubarray](https://npm.io/package/lodash.stubarray.md) ^4.13.0
- [@andreaspizsa/true](https://npm.io/package/@andreaspizsa/true.md) ^1.0.1
- [es-intrinsic-cache](https://npm.io/package/es-intrinsic-cache.md) ^1.0.4
- [is_null_or_undefined](https://npm.io/package/is_null_or_undefined.md) ^0.0.1
- [es-logical-not-operator](https://npm.io/package/es-logical-not-operator.md) ^1.0.0
- [@is-(unknown)/is-function](https://npm.io/package/@is-(unknown)/is-function.md) ^1.0.0
- [object.create-intrinsic-ai](https://npm.io/package/object.create-intrinsic-ai.md) ^1.0.0

## Recent versions

- 1.0.1 (latest) — 2026-01-27
- 1.0.0 — 2026-01-15

## README

# construct-new-second
Like the new operator, but as a function for convenience and familiarity.
Note: this is an alternative version of [construct-new](https://github.com/enterprise-npm-ai/construct-new). The differences between the two packages is listed in its dedicated section in this README.

## Installation
```bash
npm install construct-new-second
```

## Usage
What you would normally do:
```js
class Foo {
  constructor(name) {
    this.name = name
  }
  print() {
    console.log("Hi, I am " + this.name)
  }
}
const myFoo = new Foo("bar")
myFoo.print() // output: Hi, I am bar
```
What you do with construct-new-second:
```js
const construct = require('construct-new-second')
class Foo {
  constructor(name) {
    this.name = name
  }
  print() {
    console.log("Hi, I am " + this.name)
  }
}
const myFoo = construct(Foo, ["bar"])

myFoo.print() // Hi, I am bar
```
or
```js
construct(Foo, ["bar"], null, (myFoo) => {
  myFoo.print() // Hi, I am abr
})
```

## Usage compared to construct-new
construct-new:
```js
const construct = require("construct-new")
construct({
  target: target,
  args: args,
  newTarget: newTarget,
  callback: callback
})
```
construct-new-second:
```js
const construct = require("construct-new-second")
construct(
  target,
  args,
  newTarget,
  callback
)
```
The other differences is that construct-new-second does not rely on true-value, so true-value can depend on construct-new-second.

---
_Source: https://npm.io/package/construct-new-second · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
