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: 14

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