1.13.1 • Published 6 months ago

object-inspect v1.13.1

Weekly downloads
20,401,986
License
MIT
Repository
github
Last release
6 months ago

object-inspect Version Badge

string representations of objects in node and the browser

github actions coverage dependency status dev dependency status License Downloads

npm badge

example

circular

var inspect = require('object-inspect');
var obj = { a: 1, b: [3,4] };
obj.c = obj;
console.log(inspect(obj));

dom element

var inspect = require('object-inspect');

var d = document.createElement('div');
d.setAttribute('id', 'beep');
d.innerHTML = '<b>wooo</b><i>iiiii</i>';

console.log(inspect([ d, { a: 3, b : 4, c: [5,6,[7,[8,[9]]]] } ]));

output:

[ <div id="beep">...</div>, { a: 3, b: 4, c: [ 5, 6, [ 7, [ 8, [ ... ] ] ] ] } ]

methods

var inspect = require('object-inspect')

var s = inspect(obj, opts={})

Return a string s with the string representation of obj up to a depth of opts.depth.

Additional options:

  • quoteStyle: must be "single" or "double", if present. Default 'single' for strings, 'double' for HTML elements.
  • maxStringLength: must be 0, a positive integer, Infinity, or null, if present. Default Infinity.
  • 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.
  • indent: must be "\t", null, or a positive integer. Default null.
  • 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')

install

With npm do:

npm install object-inspect

license

MIT

es-abstractside-channelenzymestatic-module@huyhpham/rn-linearchetype-libraryeasy-select-rnvuedragdropuploadimagesreact-native-bluetooth2killi8n-react-native-fast-imagespecify-importsbabel-specify-imports@icanpm/api-master@arisageha/react-lazyload@arisageha/react-lazyload-fix@cashremit/cr-streamline-icons@almeidaa/msreact-native-template-rfbaseairscanairscan-examplebb-chatreact-native-esc-pos-sahaab@borisovart/atol-kkt-module@frxf/frxf@phil8795/pecuniarius-apideneme323112@aries-framework/core-test@fundefund/funde_ck@ntt_app/react-native-custom-notificationreact-native-covid-sdkgql_din_modafryxiconsmutasi-bca@jttechnic/interpreter@l1nyanm1ng/react-picture-viewer@saeon/quick-formcthpb-plugin-socialreact-native-printer-brothersreact-native-shekhar-bridge-testcogoportutilsuncoded-connectlevibestliblevibestlib2levilibtest19levilibtest24levilibtest25levilibtest26levilibtest27levilibtest28levilibtest29wilscanner@grabrinc/isomorphic-logger@khalitovadel/abstract-repository@oiti/documentoscopy-react-native@respondea/cordova-plugin-v-inappbrowserquoc-testreact-native-slider-kfhexa-node-common@infinitebrahmanuniverse/nolb-object-@wumijs/commoncclibyarntest@saaspe/componentshyperpass-sdkexpand-react-bridgeexpress-api-pack-tropea-bootstraapluminos-ui-coresklif-ui-kitsklif-api@everything-registry/sub-chunk-2365jawwy-sdkjawwy_gamification_release@314oner_npm/universal-components-library@deepakorg/test@deepak757/testreact-native-sphereuisphereuijawwy_libraryreact-native-credit-card-pkgond@gmogshd-cto-office/credo-corep149-tablesklif-uimachinebeemrcapsreact-native-jawwy_sample@ifanshx/cycgods@igniswap/igni-swap-lib@ikon-x/ckeditor5-custom-build-for-irrosoft@idas1/ui-component-lib@icetee/react-recaptcha-v3@i-mediasolutions/capacitor-share@img-arena/img-ui-mui-theme@img-arena/ui-core@jabatoforever/react-tw-datepicker@mauriciora/heroicons@levlevin/react-portal-tooltip@materia-dex/materia-contracts-proxy@mathu01/gdpr-consent@maujzs/branch-release
1.13.1

6 months ago

1.13.0

6 months ago

1.12.3

1 year ago

1.12.2

2 years ago

1.12.1

2 years ago

1.12.0

2 years ago

1.11.1

2 years ago

1.11.0

3 years ago

1.10.3

3 years ago

1.10.2

3 years ago

1.10.1

3 years ago

1.10.0

3 years ago

1.9.0

3 years ago

1.8.0

4 years ago

1.7.0

4 years ago

1.6.0

6 years ago

1.5.0

6 years ago

1.4.1

6 years ago

1.4.0

7 years ago

1.3.0

7 years ago

1.2.2

7 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.1.0

8 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

10 years ago

0.4.0

10 years ago

0.3.1

10 years ago

0.3.0

10 years ago

0.2.0

10 years ago

0.1.3

11 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago

0.0.0

11 years ago