1.0.1 • Published 1 year ago

subjectify v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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')
1.0.1

1 year ago

1.0.0

1 year ago