Package Exports
- @ibnlanre/objectify
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@ibnlanre/objectify) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
objectify
A utility for converting a JS reference type to an object
Install
npm i @ibnlanre/objectifyImport
// Browser
<script src="https://unpkg.com/@ibnlanre/objectify"></script>;
// ES6 Import
import objectify from "@ibnlanre/objectify"
// NodeJS Require
const objectify = require("@ibnlanre/objectify");API
objectify(item [, callbackFn [, thisArg]])Usage
objectify(5) // {}
// callbacks should return an array
const cb = ([value, key], index, item) => [index, value]
// { 0: 6, 1: 8, 2: 90 }
objectify(new Set([6, 8, 90]), cb)
// { 0: "zero", 1: [4, 5, 6] }
objectify(new Map([[0, "zero"], [1, [4, 5, 6]]]))
// { 0: "h", 1: "e", 2: "l", 3: "p" }
objectify("help")