Start sharing components as a team!Share components as a team!Join Bit to build your applications faster.Get Started Free

assign

v2.0.0arrow_drop_down
v2.0.0
STATUS
Passing
DOWNLOADS
8
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
4 months ago
SIZE
561 B
1 contributor
Use assign in your project ?
Copied
npm i @bit/date-fns.date-fns.assign
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.dev
Component Example
React
React
Vue
Angular
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
//undefined
const object = {};
assign(object, { a: 1, b: 2, c: 3 });
modifieddraft
chevron_left
chevron_right
Test Summary

assign assigns properties of the second argument to the first argument

Pass

assign the object passed as 2nd argument remains unchanged when the result is mutated

Pass

assign returns the first argument when the second argument is undefined

Pass

assign throws TypeError exception if the first argument is `undefined

Pass