HarshvardhanCn01/Voice-Assistant
0
1# object-inspect <sup>[![Version Badge][npm-version-svg]][package-url]</sup>2 3string representations of objects in node and the browser4 5[![github actions][actions-image]][actions-url]6[![coverage][codecov-image]][codecov-url]7[![License][license-image]][license-url]8[![Downloads][downloads-image]][downloads-url]9 10[![npm badge][npm-badge-png]][package-url]11 12# example13 14## circular15 16``` js17var inspect = require('object-inspect');18var obj = { a: 1, b: [3,4] };19obj.c = obj;20console.log(inspect(obj));21```22 23## dom element24 25``` js26var inspect = require('object-inspect');27 28var d = document.createElement('div');29d.setAttribute('id', 'beep');30d.innerHTML = '<b>wooo</b><i>iiiii</i>';31 32console.log(inspect([ d, { a: 3, b : 4, c: [5,6,[7,[8,[9]]]] } ]));33```34 35output:36 37```38[ <div id="beep">...</div>, { a: 3, b: 4, c: [ 5, 6, [ 7, [ 8, [ ... ] ] ] ] } ]39```40 41# methods42 43``` js44var inspect = require('object-inspect')45```46 47## var s = inspect(obj, opts={})48 49Return a string `s` with the string representation of `obj` up to a depth of `opts.depth`.50 51Additional options:52 - `quoteStyle`: must be "single" or "double", if present. Default `'single'` for strings, `'double'` for HTML elements.53 - `maxStringLength`: must be `0`, a positive integer, `Infinity`, or `null`, if present. Default `Infinity`.54 - `customInspect`: When `true`, a custom inspect method function will be invoked (either undere the `util.inspect.custom` symbol, or the `inspect` property). When the string `'symbol'`, only the symbol method will be invoked. Default `true`.55 - `indent`: must be "\t", `null`, or a positive integer. Default `null`.56 - `numericSeparator`: must be a boolean, if present. Default `false`. If `true`, all numbers will be printed with numeric separators (eg, `1234.5678` will be printed as `'1_234.567_8'`)57 58# install59 60With [npm](https://npmjs.org) do:61 62```63npm install object-inspect64```65 66# license67 68MIT69 70[package-url]: https://npmjs.org/package/object-inspect71[npm-version-svg]: https://versionbadg.es/inspect-js/object-inspect.svg72[deps-svg]: https://david-dm.org/inspect-js/object-inspect.svg73[deps-url]: https://david-dm.org/inspect-js/object-inspect74[dev-deps-svg]: https://david-dm.org/inspect-js/object-inspect/dev-status.svg75[dev-deps-url]: https://david-dm.org/inspect-js/object-inspect#info=devDependencies76[npm-badge-png]: https://nodei.co/npm/object-inspect.png?downloads=true&stars=true77[license-image]: https://img.shields.io/npm/l/object-inspect.svg78[license-url]: LICENSE79[downloads-image]: https://img.shields.io/npm/dm/object-inspect.svg80[downloads-url]: https://npm-stat.com/charts.html?package=object-inspect81[codecov-image]: https://codecov.io/gh/inspect-js/object-inspect/branch/main/graphs/badge.svg82[codecov-url]: https://app.codecov.io/gh/inspect-js/object-inspect/83[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/object-inspect84[actions-url]: https://github.com/inspect-js/object-inspect/actions85 