{"library":"lodash._getnative","title":"Lodash Internal `getNative` Helper","description":"lodash._getnative is an internal utility module extracted from Lodash v3, specifically version 3.9.1. Its primary function is to safely retrieve references to native JavaScript functions and methods, such as `Object.prototype.toString`, by bypassing any potential user-defined overrides. This package was part of Lodash's modular build strategy during its v3 era, offered as a standalone CommonJS module. With the evolution of the main Lodash library to v4 and beyond, and the shift towards `lodash-es` for tree-shakable ES modules, this specific internal module is no longer actively maintained or recommended for direct consumption in modern applications. Its release cadence was intrinsically tied to the lifecycle of Lodash v3, and it does not receive updates for contemporary Lodash versions or ECMAScript Module environments.","language":"javascript","status":"abandoned","last_verified":"Sun Apr 19","install":{"commands":["npm install lodash._getnative"],"cli":null},"imports":["const getNative = require('lodash._getnative');"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const getNative = require('lodash._getnative');\n\n// getNative is an internal Lodash helper designed to safely retrieve a reference to a native function\n// or method, circumventing potential userland overrides that could exist on prototypes or global objects.\n// This ensures that Lodash can always rely on the original, untampered native behavior.\n\nconst nativeToString = getNative(Object.prototype, 'toString');\n\nif (typeof nativeToString === 'function') {\n  console.log('Successfully retrieved native Object.prototype.toString function.');\n  // Using the retrieved native function to get the type of an array\n  console.log('Type of [] is:', nativeToString.call([])); // Expected output: [object Array]\n  console.log('Type of null is:', nativeToString.call(null)); // Expected output: [object Null]\n} else {\n  console.log('Failed to retrieve native toString function. This package might not be compatible with your environment or Lodash version.');\n}\n\n// Note: This package is an internal utility and not intended for general application development.","lang":"javascript","description":"Demonstrates how to import and use the internal `getNative` function to retrieve a reference to a native method, like `Object.prototype.toString`.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}