mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
Replace function expressions with function declarations in preparation for a lint rule requiring function declarations. PR-URL: https://github.com/nodejs/node/pull/12711 Backport-PR-URL: https://github.com/nodejs/node/pull/13774 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
14 lines
236 B
JavaScript
14 lines
236 B
JavaScript
'use strict';
|
|
require('../common');
|
|
const assert = require('assert');
|
|
|
|
function func() {}
|
|
let toStringCalled = false;
|
|
func.toString = function() {
|
|
toStringCalled = true;
|
|
};
|
|
|
|
require('util').inspect(func);
|
|
|
|
assert.ok(!toStringCalled);
|