loupe

Inspect utility for Node.js and browsers

Please upgrade to 2.3.7 which fixes GHSA-4q6p-r6v2-jvc5
Last updated 3 years ago by chai .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install loupe 
SYNC missed versions from official npm registry.

npm Build Codecov branch

What is loupe?

Loupe turns the object you give it into a string. It's similar to Node.js' util.inspect() function, but it works cross platform, in most modern browsers as well as Node.

Installation

Node.js

loupe is available on npm. To install it, type:

$ npm install loupe

Browsers

You can also use it within the browser; install via npm and use the loupe.js file found within the download. For example:

<script src="./node_modules/loupe/loupe.js"></script>

Usage

const { inspect } = require('loupe');
inspect({ foo: 'bar' }); // => "{ foo: 'bar' }"
inspect(1); // => '1'
inspect('foo'); // => "'foo'"
inspect([ 1, 2, 3 ]); // => '[ 1, 2, 3 ]'
inspect(/Test/g); // => '/Test/g'

// ...

Tests

$ npm test

Coverage:

$ npm run upload-coverage

License

(The MIT License)

Copyright (c) 2011-2013 Jake Luer jake@alogicalparadox.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Current Tags

  • 3.1.1                                ...           latest (6 months ago)

29 Versions

  • 3.1.1                                ...           6 months ago
  • 3.1.0                                ...           10 months ago
  • 3.0.2                                ...           a year ago
  • 3.0.1                                ...           a year ago
  • 3.0.0                                ...           a year ago
  • 2.3.7                                ...           a year ago
  • 2.3.6 [deprecated]           ...           2 years ago
  • 2.3.5 [deprecated]           ...           2 years ago
  • 2.3.4 [deprecated]           ...           3 years ago
  • 2.3.3 [deprecated]           ...           3 years ago
  • 2.3.2 [deprecated]           ...           3 years ago
  • 2.3.1 [deprecated]           ...           3 years ago
  • 2.3.0 [deprecated]           ...           3 years ago
  • 2.2.1 [deprecated]           ...           3 years ago
  • 2.2.0 [deprecated]           ...           3 years ago
  • 2.1.2 [deprecated]           ...           3 years ago
  • 2.1.1 [deprecated]           ...           4 years ago
  • 2.1.0 [deprecated]           ...           4 years ago
  • 2.0.3 [deprecated]           ...           4 years ago
  • 2.0.2 [deprecated]           ...           4 years ago
  • 2.0.1 [deprecated]           ...           4 years ago
  • 1.0.5                                ...           4 years ago
  • 1.0.4                                ...           4 years ago
  • 1.0.3                                ...           4 years ago
  • 2.0.0 [deprecated]           ...           4 years ago
  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
  • 0.0.1                                ...           11 years ago
Maintainers (2)
Downloads
Total 3
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE