Wade w

one npm package to resolve the issue in vue about clone array or object

Version: 1.0.0 Updated: 07/27/2017

By: yong.wang License: MIT

Downloads Last 30 Days: 15

Install

npm i wade-w
yarn add wade-w

CDNs

bundle.run: https://bundle.run/wade-w

jsDelivr: https://cdn.jsdelivr.net/npm/wade-w

unpkg: https://unpkg.com/wade-w

w

Why I developed the project

When I use the vue framework, I want to clone a array and I don't want to change the original data,so I want use some function to finish this job, So I try two ways

1:Use the "clone" of underscore or lodash

2:Use the "slice(0)" of JS

Both of these two function were failed. After that I find a solution: JSON.parse(JSON.stringify(object));

run

npm install

test

npm test

Contributors



yong.wang
commits

Dependencies


Categories: Vue js
Tags: vueclone