Socket
Socket
Sign inDemoInstall

dom-schema

Package Overview
Dependencies
17
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    dom-schema

view html schema


Version published
Weekly downloads
2
decreased by-60%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

ezgif com-video-to-gif

#get

var htmlSchema = require('../index.js')

htmlSchema.get('https://github.com/',function(result){
	console.log(result)
})

don't need to handle err,just one parameter in callback function.

#searchAllMetaTag

var htmlSchema = require('../index.js')

htmlSchema.get('https://github.com/',function(result){
	console.log(htmlSchema.searchAllMetaTag(result))
})

output:

<meta ....>
<meta ....>
<meta ....>

#searchAllTagWithId



var htmlSchema = require('../index.js')

htmlSchema.get('https://github.com/',function(result){ console.log(htmlSchema.searchAllTagWithId(result)) })

output:

all tags with an id attribute


#searchAllTagWithClass

var htmlSchema = require('../index.js')

htmlSchema.get('https://github.com/',function(result){ console.log(htmlSchema.searchAllTagWithClass(result)) })

output:

all tags with an class attribute


#searchAllTagWithTagName

var htmlSchema = require('../index.js')

htmlSchema.get('https://github.com/',function(result){ console.log(htmlSchema.searchAllTagWithTagName(result,'script')) })

output:

all script tags.

You can also change to which tags you want to searching for.


#searchAllTagwithStyle

var htmlSchema = require('../index.js')

htmlSchema.get('https://github.com/',function(result){ console.log(htmlSchema.searchAllTagwithStyle(result)) })


output:

all tags with an style attribute



#searchAllfunction

htmlSchema.get('https://raw.githubusercontent.com/EasonWang01/Redux-tutorial/master/redux/reducer.js',function(result){

console.log(htmlSchema.searchAllfunction(result))

})


output:

output all functions inside

Keywords

FAQs

Last updated on 14 May 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc