Skip to content

Commit

Permalink
[feat] Implement custom inspect on sails.helpers (#7282)
Browse files Browse the repository at this point in the history
* feat: implement custom inspect on sails.helpers

* Update .eslintrc

* Revert "feat: implement custom inspect on sails.helpers"

This reverts commit f35bf59.

* feat: implement inspect for helpers

---------
  • Loading branch information
DominusKelvin committed Jun 23, 2023
1 parent ed6bf2e commit 9127e63
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .eslintrc
Expand Up @@ -23,7 +23,8 @@
},

"globals": {
"Promise": true
"Promise": true,
"Symbol": true,
// ^^Available since Node v4
},

Expand Down
2 changes: 1 addition & 1 deletion lib/hooks/helpers/index.js
Expand Up @@ -148,7 +148,7 @@ module.exports = function(sails) {
// > NOTE: This is NOT `sails.config.helpers`-- this is `sails.helpers`!
// > (As for sails.config.helpers, it's set automatically based on our `defaults above)
sails.helpers = {};
Object.defineProperty(sails.helpers, 'inspect', {
Object.defineProperty(sails.helpers, Symbol.for('nodejs.util.inspect.custom'), {
enumerable: false,
configurable: false,
writable: true,
Expand Down

0 comments on commit 9127e63

Please sign in to comment.