Files
ClassFeedback/node_modules/get-proto/README.md
chengzi 3b75170862 feat: 添加第12课课评、班级总结及学生画像更新
- K4周日1900班第12课《花朵随心画》课评(梁境城、钟嘉逸、王睿意补课)
- AICODE03/CSP03各班级第12课课评及班级总结
- 更新多班级学生画像
- 课评生成技能优化
2026-05-24 20:48:34 +08:00

1.8 KiB

get-proto Version Badge

github actions coverage License Downloads

npm badge

Robustly get the Prototype of an object. Uses the best available method.

Getting started

npm install --save get-proto

Usage/Examples

const assert = require('assert');
const getProto = require('get-proto');

const a = { a: 1, b: 2, [Symbol.toStringTag]: 'foo' };
const b = { c: 3, __proto__: a };

assert.equal(getProto(b), a);
assert.equal(getProto(a), Object.prototype);
assert.equal(getProto({ __proto__: null }), null);

Tests

Clone the repo, npm install, and run npm test