htc 7ca38fdcbb 善行少年PC端首次提交(基础版) преди 10 месеца
..
.github 7ca38fdcbb 善行少年PC端首次提交(基础版) преди 10 месеца
test 7ca38fdcbb 善行少年PC端首次提交(基础版) преди 10 месеца
.eslintrc 7ca38fdcbb 善行少年PC端首次提交(基础版) преди 10 месеца
CHANGELOG.md 7ca38fdcbb 善行少年PC端首次提交(基础版) преди 10 месеца
LICENSE 7ca38fdcbb 善行少年PC端首次提交(基础版) преди 10 месеца
README.md 7ca38fdcbb 善行少年PC端首次提交(基础版) преди 10 месеца
accessor.d.ts 7ca38fdcbb 善行少年PC端首次提交(基础版) преди 10 месеца
accessor.js 7ca38fdcbb 善行少年PC端首次提交(基础版) преди 10 месеца
index.d.ts 7ca38fdcbb 善行少年PC端首次提交(基础版) преди 10 месеца
index.js 7ca38fdcbb 善行少年PC端首次提交(基础版) преди 10 месеца
mutator.d.ts 7ca38fdcbb 善行少年PC端首次提交(基础版) преди 10 месеца
mutator.js 7ca38fdcbb 善行少年PC端首次提交(基础版) преди 10 месеца
package.json 7ca38fdcbb 善行少年PC端首次提交(基础版) преди 10 месеца
tsconfig.json 7ca38fdcbb 善行少年PC端首次提交(基础版) преди 10 месеца

README.md

has-proto Version Badge

github actions coverage License Downloads

npm badge

Does this environment have the ability to set the [[Prototype]] of an object on creation with __proto__?

Example

var hasProto = require('has-proto');
var assert = require('assert');

assert.equal(typeof hasProto(), 'boolean');

var hasProtoAccessor = require('has-proto/accessor')();
if (hasProtoAccessor) {
	assert.equal([].__proto__, Array.prototype);
} else {
	assert(!('__proto__' in Object.prototype));
}

var hasProtoMutator = require('has-proto/mutator');
var obj = {};
assert('toString' in obj);

obj.__proto__ = null;
if (hasProtoMutator) {
	assert(!('toString' in obj));
} else {
	assert('toString' in obj);
	assert.equal(obj.__proto__, null);
}

Tests

Simply clone the repo, npm install, and run npm test