1.0.9 • Published 2 years ago

zetaform v1.0.9

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

HELLO 🎉

resforx repository now opened!

resforx is BE & DBA programmer and made zetaform

Zetaform

zetaform is JS library which find html elements using tag names and attributes

zetaform is now beta version to prepare, and make it

Usage

installation

you can use yarn or npm to install it

yarn:

yarn add zetaform

npm:

npm install zetaform

statements

htmlsector(): htmlsector is a method which find html elements with using tags or attributes

const htmlsector = (tag, attribute, html) => {
   const regex = new RegExp(`<${tag} ${attribute}.*?>([\\s\\S]*?)<\/${tag}>`, 'g');
   let match = regex.exec(html);
   const result = [];
   const content = [];
   while (match != null) {
       result.push(match[0]); 
       content.push(match[1]);  
       match = regex.exec(html);
   }
   return {
       value: () => content.join(' '), 
       toString: () => result.join(' ')
   };
}

to use htmlsector,

htmlsector("tag (like h1, p)", "attribute (like class, id)", <variable name>);

variable name is which you write parameters in fs function, fs will be need because fs module helps reading html files

Contact

for more contact of resforx, come to feather076@gmail.com or paedeogim@gmail.com

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago