New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

raw-object

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

raw-object

Create an object with a null prototype

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

raw-object

Install

npm install --save raw-object

Usage

const rawObject = require('raw-object');
//Create an object with no properties.
let one = rawObject();
//Assign properties to the object
let two = rawObject({
    prop1: 'one'
});
//Extend the created object
let three = rawObject(one, two, {
    prop2: 'two'
});

console.log('two.prop1 ',two.prop1); //one
console.log('three.prop1 ',three.prop1); //one
console.log('three.prop2 ',three.prop2); //two

About

Use this to create an object with a null prototype.

A null prototype makes it easier to check with the in operator like name in object.

Keywords

object

FAQs

Package last updated on 10 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts