{"id":16416623,"url":"https://github.com/angeal185/domscript","last_synced_at":"2025-11-14T20:17:46.607Z","repository":{"id":57097655,"uuid":"275311272","full_name":"angeal185/domscript","owner":"angeal185","description":"A lightning fast dom query and manipulation lib for when speed matters","archived":false,"fork":false,"pushed_at":"2020-06-30T18:49:43.000Z","size":87,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-07T00:36:07.989Z","etag":null,"topics":["browser","dom","dom-manipulation","dom-querying","javascript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/angeal185.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-27T06:10:39.000Z","updated_at":"2020-06-30T18:48:01.000Z","dependencies_parsed_at":"2022-08-20T16:50:48.820Z","dependency_job_id":null,"html_url":"https://github.com/angeal185/domscript","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angeal185%2Fdomscript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angeal185%2Fdomscript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angeal185%2Fdomscript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angeal185%2Fdomscript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/angeal185","download_url":"https://codeload.github.com/angeal185/domscript/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240466791,"owners_count":19805862,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["browser","dom","dom-manipulation","dom-querying","javascript"],"created_at":"2024-10-11T07:09:41.986Z","updated_at":"2025-11-14T20:17:41.555Z","avatar_url":"https://github.com/angeal185.png","language":"JavaScript","readme":"![](https://i.ibb.co/yRs6QW3/domscript.png)\n\n#### A lightning fast dom query and manipulation lib for when speed matters.\n\n![cd-img] ![dep-img] ![sz-img]\n\n[![NPM Version][npm-img]][npm-url] ![lic-img]\n\n# Documentation\n\n- [about](#about)\n- [installation](#installation)\n- [build](#build)\n- [performance](#performance)\n- [API](#api)\n- [id](#id)\n- [class](#class)\n- [tag](#tag)\n- [qs](#qs)\n- [qsa](#qsa)\n- [name](#name)\n- [addClass](#addClass)\n- [rmClass](#rmClass)\n- [tgClass](#rmClass)\n- [hasClass](#hasClass)\n- [attr](#attr)\n- [rmAttr](#rmAttr)\n- [tgAttr](#rmAttr)\n- [getAttr](#getAttr)\n- [child](#child)\n- [parent](#parent)\n- [after](#after)\n- [before](#before)\n- [first](#first)\n- [last](#last)\n- [clone](#clone)\n- [append](#append)\n- [prepend](#prepend)\n- [next](#next)\n- [prev](#prev)\n- [rm](#rm)\n- [empty](#empty)\n- [replace](#replace)\n- [html](#html)\n- [txt](#txt)\n- [each](#each)\n- [filter](#filter)\n- [on](#on)\n- [off](#off)\n- [addEvt](#addEvt)\n- [rmEvt](#rmEvt)\n- [css](#css)\n- [eq](#eq)\n- [click](#click)\n- [submit](#submit)\n- [focus](#focus)\n- [blur](#blur)\n- [cb](#cb)\n- [set](#set)\n- [create](#create)\n\n# about\n\nDomscript is a lightning fast dom query/manipulation tool that you can easily\ncustomize to suit your needs.\n\nThe goal of domscript is to enable developers to rapidly chain\nmethods while achieving similar to vanilla js speed.\n\nif you can query and manipulate the dom with javascript, you can already use domscript.\n\nyou should get the same results and errors as though you were writting vanilla js.\n\n* all prototype methods are optional\n* custom methods can be easily be built into the prototype chain\n* current maximum build size of 3.1kb minified\n* no regex/unsafe functions\n* about as close to using vanilla js speed as it gets.\n\n# installation\n\nnpm\n\nstable release\n\n```sh\n$ npm install @angeal185/domscript --save\n```\n\ndev release\n\ngit\n```sh\n$ git clone https://github.com/angeal185/domscript.git\n```\n\nbrowser\n\n```html\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003cmeta charset=\"utf-8\"\u003e\n    \u003cscript src=\"/path/to/domscript.mjs\" type=\"module\"\u003e\u003c/script\u003e\n    \u003c!-- or --\u003e\n    \u003cscript src=\"/path/to/domscript.js\"\u003e\u003c/script\u003e\n  \u003c/head\u003e\n\u003c/html\u003e\n```\n- [index](#documentation)\n\n# build\n\n`$ npm run build` will build domscript into the `./dist` folder.\n\n* the config file is located at `./build/config.json`.\n* the build source is located at `./lib/index.js`.\n* `config.includes` allows you to enable/disable prototype methods from the final build.\n* You can also reorganize the order of the prototype chain based on your usage of the methods\n* reorganization should be done with your most used methods at the top.\n* you can also manually add custom methods to the prototype at `./lib/index.js`.\n* the custom method names should be added and enabled to `config.includes`\n* `config.export_as` controls the variable name used to call domscript.\n* `config.module_name` controls the built output base name.\n* `config.module_ext` controls the built output file extension.\n* `config.iuclude_utils` controls adding the util function.\n* if none of your methods use domscripts util function `config.iuclude_utils` will exclude it from the build.\n* `config.is_module` controls the export method of domscript.\n* if you are not using domscript as a module, `config.is_module` should be `false`\n- [index](#documentation)\n\n# performance\n\nbelow is a very basic example of domscripts potential.\n```js\n\n// jquery\nconsole.time('jquery')\nfor (let i = 0; i \u003c 1000; i++) {\n  $('#test-id').addClass('test1').text('test1');\n}\nconsole.timeEnd('jquery');\n\n// zepto\nconsole.time('zepto')\nfor (let i = 0; i \u003c 1000; i++) {\n  $('#test-id').addClass('test2').text('test2');\n}\nconsole.timeEnd('zepto');\n\n// umbrella.js\nconsole.time('umbrella')\nfor (let i = 0; i \u003c 1000; i++) {\n  u('#test-id').addClass('test3').text('test3');\n}\nconsole.timeEnd('umbrella');\n\n// vanilla javascript\nconsole.time('javascript')\nfor (let i = 0; i \u003c 1000; i++) {\n  let item = document.getElementById('test-id');\n  item.classList.add('test4');\n  item.textContent = 'test4';\n}\nconsole.timeEnd('javascript');\n\n// domscript\nconsole.time('domscript')\nfor (let i = 0; i \u003c 1000; i++) {\n  d.id('test-id').addClass('test5').txt('test5');\n}\nconsole.timeEnd('domscript');\n\n\n// jquery 157.0546875ms\n// zepto 145.590087890625ms\n// umbrella 143.53515625ms\n\n// javascript 14.052001953125ms\n// domscript 18.84423828125ms\n\n```\n\nyour end results should always have domscript running similar speed\nto native js. the lower the amount of methods included in the domscript prototype,\nthe faster and closer it should be. if you don't use it, exclude it.\n\n- [index](#documentation)\n\n# id\nget elementById\n\nexamples:\n```js\n\n// return element by id\nd.id('test-id').r;\n\n\n// get element by id, add class\nd.id('test-id').addClass('test-class');\n\n\n// get element by id, add class, add onclick event\nd.id('test-id').addClass('test-class').on('click', function(evt){\n  console.log(evt.target.id)\n});\n\n```\n- [index](#documentation)\n\n# class\nget elementsByClassName\n\nexamples:\n```js\n\n// return HTMLCollection by class\nd.class('test-class').r;\n\n// return element by class and index\nd.class('test-class', 0).r;\n\n// get HTMLCollection by class, add id to each\nd.class('test-class').each(function(ele, idx){\n  ele.id = 'id-'+ idx\n});\n\n// get first element by class, add id\nd.class('test-class', 0).id('test-id');\n\n\n```\n- [index](#documentation)\n\n# tag\nget elementsByTagName\n\nexamples:\n```js\n\n// return HTMLCollection by tag\nd.tag('div').r;\n\n// return element by tag and index\nd.tag('div', 0).r;\n\n// get HTMLCollection by tag, add id to each\nd.tag('div').each(function(ele, idx){\n  ele.id = 'id-'+ idx\n});\n\n// get first element by tag, add id\nd.tag('tag', 0).id('test-id');\n\n\n```\n- [index](#documentation)\n\n# qs\ndocument querySelector\n\nexamples:\n```js\n\n// return element by selector\nd.qs('#test-id p').r;\n\n// remove element by selector\nd.qs('#test-id p').rm();\n\n// get element by selector and return textContent\nd.qs('#test-id p').txt();\n\n// get element by selector and edit textContent\nd.qs('#test-id p').txt('new text');\n\n// get element by selector and edit style\nd.qs('#test-id p').css('color', 'red');\n\n\n```\n- [index](#documentation)\n\n# qsa\ndocument querySelectorAll\n\nexamples:\n```js\n\n// return HTMLCollection by selector\nd.qsa('.test-class p');\n\n// get elements by selector and edit textContent of each\nd.qsa('.test-class p').each(function(ele,idx){\n  ele.textContent = 'element '+ idx;\n})\n\n// get element by selector and remove all\nd.qsa('.test-class p').each(function(ele, idx){\n  ele.remove()\n});\n\n\n```\n- [index](#documentation)\n\n# name\nget elementsByName\n\nexamples:\n```js\n\n// return HTMLCollection by name\nd.name('test-name').r;\n\n// return element by name and index\nd.name('test-name', 0).r;\n\n// get HTMLCollection by name, add id to each\nd.name('test-name').each(function(ele, idx){\n  ele.id = 'id-'+ idx\n});\n\n// get first element by name, add id\nd.name('test-name', 0).id('test-id');\n\n\n```\n- [index](#documentation)\n\n# addClass\nadd class/classlist to element\n\nexamples:\n```js\n\n// add a class\nd.id('test-id').addClass('class1');\n\n// add classes\nd.id('test-id').addClass('class1','class2','class3');\n\n\n```\n- [index](#documentation)\n\n# rmClass\nremove class/classlist to element\n\nexamples:\n```js\n\n// remove a class\nd.id('test-id').rmClass('class1');\n\n// remove classes\nd.id('test-id').rmClass('class1','class2','class3');\n\n\n```\n- [index](#documentation)\n\n# tgClass\ntoggle class of element\n\nexamples:\n```js\n\n// remove/add class\nd.id('test-id').tgClass('class1');\n\n\n```\n- [index](#documentation)\n\n# hasClass\ncheck if class exists\n\nexamples:\n```js\n\n// check if class exists\nif(d.id('test-id').hasClass('class1')){\n  console.log('class1 exists!')\n} else {\n  console.log('class1 does not exist!')\n}\n\n```\n- [index](#documentation)\n\n# attr\nset attribute/s\n\nexamples:\n```js\n\n// add an attribute\nd.id('some-input').attr('type', 'text');\n\n// add multiple attributes\nd.id('some-input').attr({\n  type: 'text',\n  placeHolder: 'some placeholder'\n});\n\n```\n- [index](#documentation)\n\n# rmAttr\nremove attribute/s\n\nexamples:\n```js\n\n// remove an attribute\nd.id('some-input').rmAttr('type');\n\n// remove multiple attributes\nd.id('some-input').rmAttr('type', 'placeHolder');\n\n```\n- [index](#documentation)\n\n# tgAttr\ntoggle attribute/s\n\nexamples:\n```js\n\n// add/remove an attribute\nd.id('some-input').tgAttr('readonly');\n\n// force add/remove an attribute\nd.id('some-input').tgAttr('readonly', true);\n\n```\n- [index](#documentation)\n\n# getAttr\nget an element attribute/s\n\nexamples:\n```js\n\n// get an attribute\nconsole.log(\n  d.id('some-input').getAttr('placeHolder')\n)\n// 'some placeholder'\n\n// get multiple attributes\nconsole.log(\n  d.id('some-input').getAttr(['type', 'placeHolder'])\n)\n//{type:\"text\",placeHolder:\"some placeholder\"}\n\n```\n- [index](#documentation)\n\n# child\nget an element child/ren\n\nexamples:\n```js\n\n// return HTMLCollection of children\nd.id('test-id').child().r\n\n// get children HTMLCollection and add id to each\nd.id('test-id').child().each(function(ele, idx){\n  ele.id = 'id-'+ idx\n});\n\n// return child element by index\nd.id('test-id').child(0).r\n\n// return child element by index and return textContent\nd.id('test-id').child(0).txt()\n\n// return child element by index and edit textContent\nd.id('test-id').child(0).txt('new text')\n\n\n\n```\n- [index](#documentation)\n\n# parent\nget an elements parent element\n\nexamples:\n```js\n\n// return element parent\nd.id('test-id').parent().r\n\n// edit element parent textContent\nd.id('test-id').parent().txt('i am the parent')\n\n// return element parent's textContent\nd.id('test-id').parent().txt()\n\n// remove all children of parent\nd.id('test-id').parent().empty()\n\n// remove parent\nd.id('test-id').parent().rm()\n\n\n```\n- [index](#documentation)\n\n# after\ninsert after element\n\nexamples:\n```js\n\nlet item = d.create('div').r;\n\n// insert elements and text after querySelected element\nd.id('test-id')\n.after(item.cloneNode(),item.cloneNode(), 'after')\n.before(item.cloneNode(),item.cloneNode(), 'before')\n\n```\n- [index](#documentation)\n\n# before\ninsert before element\n\nexamples:\n```js\n\nlet item = d.create('div').r;\n\n// insert elements and text before querySelected element\nd.qs('#test-id')\n.before(item.cloneNode(),item.cloneNode(), 'before')\n.after(item.cloneNode(),item.cloneNode(), 'after')\n\n\n```\n- [index](#documentation)\n\n# first\nget elements first child\n\nexamples:\n```js\n\n// get firstChild of element\nd.id('test-id').first().r\n\n// remove firstChild of element\nd.id('test-id').first().rm()\n\n// empty firstChild of element\nd.id('test-id').first().empty()\n\n\n```\n- [index](#documentation)\n\n# last\nget elements last child\n\nexamples:\n```js\n\n// get lastChild of element\nd.id('test-id').last().r\n\n// remove lastChild of element\nd.id('test-id').last().rm()\n\n// empty lastChild of element\nd.id('test-id').last().empty()\n\n\n```\n- [index](#documentation)\n\n# clone\nclone an element\n\nexamples:\n```js\n\n// return a clone of selected element\nd.id('test-id').clone().r\n\n// return a deep clone of selected element\nd.id('test-id').clone(true).r\n\n\n```\n\n- [index](#documentation)\n\n# append\nappend to an element\n\nexamples:\n```js\n\nlet item = d.create('div').r;\n\n// append elements and text to querySelected element\nd.qs('#test-id')\n.append(item.cloneNode(),item.cloneNode(), 'appended')\n.prepend(item.cloneNode(),item.cloneNode(), 'prepended')\n\n```\n- [index](#documentation)\n\n# prepend\nprepend to an element\n\nexamples:\n```js\n\nlet item = d.create('div').r;\n\n// prepend elements and text to querySelected element\nd.qs('#test-id')\n.prepend(item.cloneNode(),item.cloneNode(), 'prepended')\n.append(item.cloneNode(),item.cloneNode(), 'appended')\n\n```\n- [index](#documentation)\n\n# next\nnext sibling\n\nexamples:\n```js\n\n// return the direct nextSibling\nd.id('test-id').next().r\n\n// return the nextElementSibling\nd.id('test-id').next(true).r\n// or d.id('test-id').next(1).r\n\n// change textContent of nextElementSibling\nd.id('test-id').next(true).txt('ok')\n\n// get textContent of nextElementSibling\nd.id('test-id').next(true).txt()\n\n// return a clone of the nextElementSibling\nd.id('test-id').next(true).clone().r\n```\n- [index](#documentation)\n\n# prev\nprevious sibling\n\nexamples:\n```js\n\n// return the direct previousSibling\nd.id('test-id').prev().r\n\n// return the previousElementSibling\nd.id('test-id').prev(true).r\n// or d.id('test-id').prev(1).r\n\n// change textContent of previousElementSibling\nd.id('test-id').prev(true).txt('ok')\n\n// get textContent of previousElementSibling\nd.id('test-id').prev(true).txt()\n\n// return a clone of the previousElementSibling\nd.id('test-id').prev(true).clone().r\n```\n- [index](#documentation)\n\n# rm\nremove element\n\nexamples:\n```js\n\n// remove selected element\nd.id('test-id').rm();\n\n// remove selected elements firstchild\nd.id('test-id').first().rm();\n\n```\n- [index](#documentation)\n\n# empty\nempty element\n\nexamples:\n```js\n\n// remove all childnodes from selected element ~ loop\nd.id('test-id').empty();\n\n// remove all childnodes from selected element ~ innerHTML = ''\nd.id('test-id').empty(true);\n// or d.id('test-id').empty(1);\n\n// remove all childnodes from selected elements lastchild\nd.id('test-id').last().empty();\n\n```\n- [index](#documentation)\n\n# replace\nreplace element\n\nexamples:\n```js\n\nlet item = d.create('div').attr('id', 'replaced').r;\n\n\n// replace an element with another element\nd.id('test-id').replace(item)\n\n// replace an element with another element and edit new element\nd.id('test-id').replace(item).txt('replace success')\n\n```\n- [index](#documentation)\n\n# html\nadd or return innerHTML\n\nexamples:\n```js\n\n// return innerHTML of element\nd.id('test-id').html()\n\n// replace or add innerHTML of element\nd.id('test-id').html('\u003cp\u003enew innerHTML\u003c/p\u003e');\n\n```\n- [index](#documentation)\n\n# txt\nadd or return textContent\n\nexamples:\n```js\n\n// return textContent of element\nd.id('test-id').txt()\n\n// replace or add textContent of element\nd.id('test-id').txt('new text');\n\n```\n- [index](#documentation)\n\n# each\nloop over elements\nexamples:\n```js\n\n// get HTMLCollection by class, add id to each\nd.class('test-class').each(function(ele, idx){\n  ele.id = 'id-'+ idx\n});\n\nd.qsa('.test-class p').each(function(ele,idx){\n  ele.textContent = 'element '+ idx;\n})\n\n// get element by selector and remove all\nd.qsa('.test-class p').each(function(ele, idx){\n  ele.remove()\n});\n\n```\n- [index](#documentation)\n\n# filter\nreturn filtered items\n\nexamples:\n```js\n\n// filter HTMLCollection\nd.class('class1').filter(function(ele, idx){\n  return ele.id !== 'id3';\n}).each(function(ele, idx){\n  ele.textContent = 'ok';\n})\n\nd.class('class1').filter(function(ele, idx){\n  return ele.id !== 'id3';\n}).r[0]\n\n\n```\n- [index](#documentation)\n\n# on\nattach single on* event to element\n\nexamples:\n```js\n\n// get element by id and add onclick event\nd.id('test-id').on('click', function(evt){\n  console.log(evt.target)\n});\n\n// get element by id and add onkeyup event\nd.id('test-input').on('keyup', function(evt){\n  console.log(evt.target)\n});\n\n// get element by id and add onload event\nd.id('test-img').on('load', function(evt){\n  console.log(evt.target)\n});\n\n```\n- [index](#documentation)\n\n# off\nremove single on* event from element\n\nexamples:\n```js\n\n// get element by id and remove onclick event\nd.id('test-id').off('click');\n\n// get element by id and remove onkeyup event\nd.id('test-input').off('keyup');\n\n// get element by id and remove onload event\nd.id('test-img').off('load');\n\n```\n- [index](#documentation)\n\n# addEvt\nattach event listener to element\n\nexamples:\n```js\n\nfunction clickEvt(){\n  console.log('clicked')\n}\n\nfunction keyEvt(){\n  console.log('keyup')\n}\n\nfunction loadEvt(){\n  console.log('loaded')\n}\n\n// get element by id and add click event listener\nd.id('test-id').addEvt('click', clickEvt);\n\n// get element by id and add onkeyup event\nd.id('test-input').addEvt('keyup', keyEvt);\n\n// get element by id and add onload event\nd.id('test-img').addEvt('load', loadEvt);\n\n```\n- [index](#documentation)\n\n# rmEvt\nremove event listener from element\n\nexamples:\n```js\n\nfunction clickEvt(){\n  console.log('clicked')\n}\n\nfunction keyEvt(){\n  console.log('keyup')\n}\n\nfunction loadEvt(){\n  console.log('loaded')\n}\n\n// get element by id and remove click event listener\nd.id('test-id').rmEvt('click', clickEvt);\n\n// get element by id and remove onkeyup event\nd.id('test-input').rmEvt('keyup', keyEvt);\n\n// get element by id and remove onload event\nd.id('test-img').rmEvt('load', loadEvt);\n\n```\n- [index](#documentation)\n\n# css\nadd styles to element\n\nexamples:\n```js\n\n// get element by selector and add single style\nd.id('test-id').css('color', 'red');\n\n// get element by selector and add multiple styles\nd.id('test-id').css({\n  'color': 'red',\n  'font-size': '96px'\n});\n\n```\n- [index](#documentation)\n\n# eq\nselect element by index\n\nexamples:\n```js\n\n\nd.class('test-class', 0).txt('index 0')\n// or\nd.class('test-class').eq(1).txt('index 1')\n\n```\n- [index](#documentation)\n\n# click\nclick an element\n\nexamples:\n```js\n\n// get element by selector and add single style\nd.id('some-button').click();\n```\n- [index](#documentation)\n\n# submit\nsubmit a form\n\nexamples:\n```js\n\n// get element by selector and add single style\nd.id('some-form').submit();\n\n```\n- [index](#documentation)\n\n# focus\nfocus an element\n\nexamples:\n```js\n\n//focus an element\nd.id('some-input').focus();\n\nd.id('some-input').focus().attr('type','text');\n\nd.id('some-input').attr({\n  placeHolder: 'test focus',\n  type: 'text'\n}).focus()\n\nd.id('some-input').on('focus', function(evt){\n  console.log('focus event')\n}).focus();\n\n```\n- [index](#documentation)\n\n# blur\nblur an element\n\nexamples:\n```js\n\n//blur a focused element\nd.id('some-input').focus();\n\nd.id('some-input').on('blur', function(evt){\n  console.log('blur event')\n}).focus().blur();\n\n```\n- [index](#documentation)\n\n# cb\nadd callback to an item containing current proto state\n\nexamples:\n```js\n\n// return element within callback function\nd.id('some-element').cb(function(ele){\n  if(ele){\n    d.set(ele).attr('readonly', true)\n  }\n})\n\n```\n- [index](#documentation)\n\n# set\nset the current proto state\n\nexamples:\n```js\n\n// cached reference\nlet cached_item = d.id('some-input').r,\ncached_item2 = d.id('other-input').r;\n\nd.set(cached_item).attr('readonly', true)\nd.set(cached_item2).attr('readonly', true)\n\n```\n- [index](#documentation)\n\n# create\ndomscript was designed for query/manipulation.\nIt has a basic create function but domscript's sister lib clonecript\nis a much better alternative and designed to work alongside domscript.\n\nclonescript was made for creation and not query/manipulation\n[clonescript](https://github.com/angeal185/clonescript)\n\nexamples:\n```js\n\nlet item = d.create('div')\n// get element by selector and add created div\n\nd.id('test-id').append(item);\n\n// do not add a proto within the proto\n//d.id('test-id').append(d.create('div'));\n```\n- [index](#documentation)\n\n\n[cd-img]: https://app.codacy.com/project/badge/Grade/01f54b0639df463f9526edb892b5e4ff\n[npm-img]: https://badgen.net/npm/v/@angeal185/domscript?style=flat-square\n[dep-img]:https://badgen.net/david/dep/angeal185/domscript?style=flat-square\n[sz-img]:https://badgen.net/packagephobia/publish/@angeal185/domscript?style=flat-square\n[lic-img]: https://badgen.net/github/license/angeal185/domscript?style=flat-square\n[npm-url]: https://npmjs.org/package/@angeal185/domscript\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangeal185%2Fdomscript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fangeal185%2Fdomscript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangeal185%2Fdomscript/lists"}