Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jcblw/bound-properties
binds an objects methods to its own context
https://github.com/jcblw/bound-properties
Last synced: 16 days ago
JSON representation
binds an objects methods to its own context
- Host: GitHub
- URL: https://github.com/jcblw/bound-properties
- Owner: jcblw
- Created: 2015-02-18T07:25:29.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2019-06-29T06:55:09.000Z (over 5 years ago)
- Last Synced: 2024-10-11T14:39:14.247Z (about 1 month ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Bound Properties
[![Greenkeeper badge](https://badges.greenkeeper.io/jcblw/bound-properties.svg)](https://greenkeeper.io/)
binds an objects methods to its own context
[![Build Status](https://travis-ci.org/jcblw/bound-properties.svg?branch=master)](https://travis-ci.org/jcblw/bound-properties)
## Usage
```javascript
var
foo = {
bar: function( ) {
return this.baz
},
baz: 'qux'
},
baz = foo.barconsole.log( baz() ) // undefined
baz = bound( foo ) // modifies exsisting ref to foo
console.log( baz() ) // qux
```