Package Exports
- var_dump
- var_dump/index.js
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 (var_dump) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
var_dump
Implementation of PHP's var_dump function for JavaScript.
Installation
Either through cloning with git or by using npm (the recommended way):
npm install var_dump --save-devUsage
const var_dump = require('var_dump')
Use var_dump while development for printing details of variables and functions.
var variable = {
'data': {
'users': {
'id': 12,
'friends': [{
'id': 1,
'name': 'John Doe'
}]
}
}
}
// print the variable using var_dump
var_dump(variable)This will print:
object(1) {
["data"] => object(1) {
["users"] => object(2) {
["id"] => number(12)
["friends"] => array(1) {
[0] => object(2) {
["id"] => number(1)
["name"] => string(8) "John Doe"
}
}
}
}
}
