shared
utils
string
object
is
extension
js
tracking
string
dom
when
selection
position
iframe
event
scroll
console
node
string
project
fs
console
toPlainObject
Type:Function
Status:stable
Since:1.0.0
Platform:jsnode
@blackbyte.sugar.shared.class
This function take a instance as parameter and return a plain object of it
Params
- instance*-Mixed
Any class instance to transform into a plain object
Return
- -Object
A plain object version of the the class instance
Example
import { toPlainObject } from '@blackbyte/sugar/class';
class Coco {
constructor() {
this.hello = 'world';
}
}
toPlainObject(new Coco()); // => { hello: 'world' }Todo
- testsnormal
Author
- Olivier Bosselolivier.bossel@gmail.com