Uname: Linux webm016.cluster127.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
Software: Apache
PHP version: 7.4.33 [ PHP INFO ] PHP os: Linux
Server Ip: 54.36.31.145
Your Ip: 216.73.216.182
User: homesquasz (91404) | Group: users (100)
Safe Mode: OFF
Disable Function:
_dyuweyrj4,_dyuweyrj4r,dl

name : readme.markdown
# shallow-copy

make a shallow copy of an object or array

[![testling badge](https://ci.testling.com/substack/shallow-copy.png)](https://ci.testling.com/substack/shallow-copy)

[![build status](https://secure.travis-ci.org/substack/shallow-copy.png)](http://travis-ci.org/substack/shallow-copy)

# example

you can copy objects shallowly:

``` js
var copy = require('shallow-copy');

var obj = { a: 3, b: 4, c: [5,6] };
var dup = copy(obj);
dup.b *= 111;
dup.c.push(7);

console.log('original: ', obj);
console.log('copy: ', dup);
```

and you can copy arrays shallowly:

``` js
var copy = require('shallow-copy');

var xs = [ 3, 4, 5, { f: 6, g: 7 } ];
var dup = copy(xs);
dup.unshift(1, 2);
dup[5].g += 100;

console.log('original: ', xs);
console.log('copy: ', dup);
```

# methods

``` js
var copy = require('shallow-copy')
```

## copy(obj)

Return a copy of the enumerable properties of the object `obj` without making
copies of nested objects inside of `obj`.

If `obj` is an array, the result will be an array.
If `obj` is an object, the result will be an object.
If `obj` is not an object, its value is returned.

# install

With [npm](https://npmjs.org) do:

```
npm install shallow-copy
```

# license

MIT
© 2026 GrazzMean
Page non trouvée – APK Comptoir Hammami
Jannah Theme License is not validated, Go to the theme options page to validate the license, You need a single license for each domain name.

404 :(

Oups ! Cette page est introuvable.

Il semble que nous ne puissions pas trouver ce que vous cherchez. Peut-être qu'une recherche pourrait vous aider.

Bouton retour en haut de la page