- K4周日1900班第12课《花朵随心画》课评(梁境城、钟嘉逸、王睿意补课) - AICODE03/CSP03各班级第12课课评及班级总结 - 更新多班级学生画像 - 课评生成技能优化
1.8 KiB
1.8 KiB
get-proto 
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
