Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clone seems to be appending data #83

Open
jloveric opened this issue Sep 19, 2017 · 0 comments
Open

clone seems to be appending data #83

jloveric opened this issue Sep 19, 2017 · 0 comments

Comments

@jloveric
Copy link

The clone function is appending functions to my code. My code looks like this

console.log(script)
let input = clone(script)
console.log('----------------')
console.log(input)
process.exit(0)

and outputs this (this first data is the input, the data below ---------- is the output). The output
has list data (I think appended to it)

{ data: 
   [ { pattern: [Array],
       response: [Array],
       details: [Object],
       intent: [Array],
       phraseClass: [Array] },
     { pattern: [Array], intent: [Array] },
     { pattern: [Array], intent: [Array] },
     { pattern: [Array], intent: [Array] },
     { pattern: [Array], intent: [Array] },
     { pattern: [Array], intent: [Array] },
     { pattern: [Array], intent: [Array] },
     { pattern: [Array], intent: [Array] },
     { pattern: [Array], intent: [Array] },
     { pattern: [Array], intent: [Array] },
     { pattern: [Array], intent: [Array] } ] }
----------------
{ data: 
   [ { pattern: [Array],
       response: [Array],
       details: [Object],
       intent: [Array],
       phraseClass: [Array] },
     { pattern: [Array], intent: [Array] },
     { pattern: [Array], intent: [Array] },
     { pattern: [Array], intent: [Array] },
     { pattern: [Array], intent: [Array] },
     { pattern: [Array], intent: [Array] },
     { pattern: [Array], intent: [Array] },
     { pattern: [Array], intent: [Array] },
     { pattern: [Array], intent: [Array] },
     { pattern: [Array], intent: [Array] },
     { pattern: [Array], intent: [Array] },
     __class__: { [Function: list] __name__: 'list' },
     __iter__: [Function],
     __getslice__: [Function],
     __setslice__: [Function],
     __repr__: [Function],
     __str__: [Function],
     append: [Function],
     clear: [Function],
     extend: [Function],
     insert: [Function],
     remove: [Function],
     index: [Function],
     py_pop: [Function],
     py_sort: [Function],
     __add__: [Function],
     __mul__: [Function],
     __rmul__: [Function],
     __bindexOf__: [Function],
     add: [Function],
     discard: [Function],
     isdisjoint: [Function],
     issuperset: [Function],
     issubset: [Function],
     union: [Function],
     intersection: [Function],
     difference: [Function],
     symmetric_difference: [Function],
     py_update: [Function],
     __eq__: [Function],
     __ne__: [Function],
     __le__: [Function],
     __ge__: [Function],
     __lt__: [Function],
     __gt__: [Function] ] }

Is this the intended result? How do I get rid of the extra 'list' data?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant