subjectify

1.0.1 • Public • Published

subjectify

Make all method calls return their call subject.

Installation

npm i subjectify

Usage

Original code:

const element = document.createElement('div')

element.setAttribute('class', 'foo')
element.setAttribute('id', 'bar')
element.append('hello world')

Simplified code using subjectify():

import subjectify from 'subjectify'


const element = subjectify(document.createElement('div'))
        .setAttribute('class', 'foo')
        .setAttribute('id', 'bar')
        .append('hello world')

Readme

Keywords

none

Package Sidebar

Install

npm i subjectify

Weekly Downloads

4

Version

1.0.1

License

MIT

Unpacked Size

2.4 kB

Total Files

4

Last publish

Collaborators

  • oelin