6.2.0 • Published 1 year ago

just-extend v6.2.0

Weekly downloads
2,756,962
License
MIT
Repository
github
Last release
1 year ago

just-extend

Part of a library of zero-dependency npm modules that do just do one thing. Guilt-free utilities for every occasion.

🍦 Try it

npm install just-extend
yarn add just-extend

Extend an object

import extend from 'just-extend';

var obj = {a: 3, b: 5};
extend(obj, {a: 4, c: 8}); // {a: 4, b: 5, c: 8}
obj; // {a: 4, b: 5, c: 8}

var obj = {a: 3, b: 5};
extend({}, obj, {a: 4, c: 8}); // {a: 4, b: 5, c: 8}
obj; // {a: 3, b: 5}

var arr = [1, 2, 3];
var obj = {a: 3, b: 5};
extend(obj, {c: arr}); // {a: 3, b: 5, c: [1, 2, 3]}
arr.push(4);
obj; // {a: 3, b: 5, c: [1, 2, 3, 4]}

var arr = [1, 2, 3];
var obj = {a: 3, b: 5};
extend(true, obj, {c: arr}); // {a: 3, b: 5, c: [1, 2, 3]}
arr.push(4);
obj; // {a: 3, b: 5, c: [1, 2, 3]}

extend({a: 4, b: 5}); // {a: 4, b: 5}
extend({a: 4, b: 5}, 3); {a: 4, b: 5}
extend({a: 4, b: 5}, true); {a: 4, b: 5}
extend('hello', {a: 4, b: 5}); // throws
extend(3, {a: 4, b: 5}); // throws
nisebaseui@neggi/baseui@iobroker-community-adapters/iobroker.device-watcher@heights/heights-ui@everything-registry/sub-chunk-1995@yhostc/nodejs-translate-apisemantic-release-gitmoji-actionsearchbox-clisettings-paneldropzone-jimmydropzoneembed-jsembed-plugin-baseembed-plugin-emojiembed-plugin-facebookembed-plugin-githubembed-plugin-highlightembed-plugin-instagramembed-plugin-mapembed-plugin-mediaembed-plugin-noembedembed-plugin-twitterembed-plugin-urlembed-plugin-url-linkifyjsembed-plugin-utilitiesembed-plugin-youtubeembed-preset-basicssh2-keeperdotenv-coredotex-pluginredux-standard-reducersrequest-queue-middlewareeach-packageeleventy-plugin-validateeleventy-plugin-iconsember-deep-buffered-proxy@awinogrodzki/embed-js@awinogrodzki/embed-plugin-utilities@awinogrodzki/embed-plugin-youtube@babbel/rollbar-client.js@bento-editor/core@clcorp/react-uicoppice@crespire/dropzonecl-tool@bearclaw/immutable-class@astro-my/sign-request@dotconf-pro/dotconf-pro@dotconf-pro/dotenvdcd-scene@alpacahq/alpaca-trade-apibaseui-omsbaseui-sdbaseuitestfigma-tokens-libraryapp-audioallapis@zalastax/nolb-jus@yonah-mozaic/jammber_mozaic_apiaxios-yet-another-proxy-fixfixed_form_buildersveltify-cms@gasket/react-intlgqtyhttp-queue-middlewaregenerator-sventechgridder-jsgulp-pottopogulp-uf-bundle-assetswx-http-middlewarek0mmand3rhw9winx-form-winxw3c-design-tokensi18n-auto-translationi18n-auto-translation-msnyderwavearea@fusion-ui/basewebminiapp-token-based-login@meta-cms/coreneulib-react@hieuquang2212/form@infinitebrahmanuniverse/nolb-jusmobx-form-store@jay-es/just-allmermalminiapp-login-middlewareminiapp-request-middlewareminiapp-basepath-middleware@johnhamlin/redux-persistlionecslodown-rayford-smith@modular-css/css-to-js@neeschit/alpaca-trade-apipolypackage@emerson-eps/cypress-image-snapshot@rill/refresh-withpramaowt-client-javascript
6.2.0

1 year ago

6.1.0

2 years ago

6.1.1

2 years ago

6.0.1

2 years ago

6.0.0

2 years ago

5.1.1

2 years ago

5.1.0

2 years ago

5.0.0

2 years ago

4.2.1

3 years ago

4.2.0

3 years ago

4.1.1

4 years ago

4.1.0

4 years ago

4.0.2

5 years ago

4.0.1

5 years ago

4.0.0

5 years ago

3.0.0

6 years ago

2.1.0

6 years ago

1.1.27

6 years ago

1.1.26

6 years ago

1.1.25

6 years ago

1.1.24

6 years ago

1.1.23

6 years ago

1.1.22

8 years ago

1.1.21

8 years ago

1.1.20

8 years ago

1.1.19

8 years ago

1.1.18

8 years ago

1.1.17

8 years ago

1.1.16

8 years ago

1.1.15

8 years ago

1.1.10

8 years ago

1.1.9

8 years ago

1.1.8

8 years ago

1.1.7

8 years ago

1.1.5

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago

1.0.1

8 years ago