shared
utils
string
object
is
extension
js
tracking
string
dom
when
selection
position
iframe
event
scroll
console
node
string
project
fs
console
mapToObject
Type:Function
Status:stable
Since:1.0.0
Platform:jsnode
@blackbyte.sugar.shared.convert
This function simply take a Map object and convert it to a plain object
Params
- map*-Map
The map object to convert into object
Return
- -Object
The plain object
Example
import { mapToObject } from '@blackbyte/sugar/convert';
const myMap = new Map();
myMap.set('hello', 'world');
mapToObject(myMap);
// {
// hello: 'world'
// }Author
- Olivier Bosselolivier.bossel@gmail.comhttps://blackbyte.space