spyrjari
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

Spyrjari

Shorthand for Object.prototype.hasOwnProperty.call() madness.

Install

yarn add spyrjari

Usage

const { hasProperty } = require('spyrjari')

const record = {
	name: 'The Number Of The Beast',
	year: 1982,
}

console.log( hasProperty(record, 'year') ) // true
console.log( hasProperty(record, 'band') ) // false

What's in the name?

"Spyrjari" comes from Old Norse verb for "spyrja" (to ask). Verb + ari structure, which makes it a noun, "someone who asks". Spyrjari is the one who asks about object properties when I don't feel like it.

Readme

Keywords

none

Package Sidebar

Install

npm i spyrjari

Weekly Downloads

8

Version

1.0.4

License

MIT

Unpacked Size

4.97 kB

Total Files

9

Last publish

Collaborators

  • stscoundrel