JSPM

@zippytech/hasown

2.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q38210F
  • License Apache-2.0

JavaScript curried hasOwn helper

Package Exports

  • @zippytech/hasown

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@zippytech/hasown) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

hasown

JavaScript curried hasOwn helper.

Install

$ npm install @zippytech/hasown

Usage

Simple usage

var hasOwn = require('@zippytech/hasown')
var person = { name: 'bob' }

hasOwn(person, 'name') == true

Curried usage

var hasOwn = require('@zippytech/hasown')
var person = { lastName: 'willson' }
var child = Object.create(person)
child.age = 1
child.firstName = 'bob'

var childHasOwn = hasOwn(child)

for (var k in child) if (childHasOwn(k)){
    console.log(k, ' = ', child[k])
}

Test

$ make

Watch mode

$ make test-w

LICENSE

Apache2