https://github.com/afeiship/next-apply
Faster apply for next.
https://github.com/afeiship/next-apply
apply call invoke next
Last synced: 9 months ago
JSON representation
Faster apply for next.
- Host: GitHub
- URL: https://github.com/afeiship/next-apply
- Owner: afeiship
- License: mit
- Created: 2019-10-22T01:49:48.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-09-07T15:08:48.000Z (over 4 years ago)
- Last Synced: 2025-03-07T17:16:18.533Z (about 1 year ago)
- Topics: apply, call, invoke, next
- Language: JavaScript
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# next-apply
> Faster apply for next.
[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]
## installation
```bash
npm install -S @jswork/next-apply
```
## usage
```js
import '@jswork/next-apply';
function create2(tag, cls) {
const el = document.createElement(tag);
el.className = cls;
el['data-cls'] = cls;
el['data-tag'] = tag;
return el;
}
nx.apply(create2, null, ['span','my-class1']);
```
## resources
- https://github.com/JayceTDE/fast-apply/blob/master/index.js
- https://www.cnblogs.com/lijiayi/p/callandapply.html
- https://blog.csdn.net/zhengyinhui100/article/details/7837127/
## license
Code released under [the MIT license](https://github.com/afeiship/next-apply/blob/master/LICENSE.txt).
[version-image]: https://img.shields.io/npm/v/@jswork/next-apply
[version-url]: https://npmjs.org/package/@jswork/next-apply
[license-image]: https://img.shields.io/npm/l/@jswork/next-apply
[license-url]: https://github.com/afeiship/next-apply/blob/master/LICENSE.txt
[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-apply
[size-url]: https://github.com/afeiship/next-apply/blob/master/dist/next-apply.min.js
[download-image]: https://img.shields.io/npm/dm/@jswork/next-apply
[download-url]: https://www.npmjs.com/package/@jswork/next-apply