str-highlight
v1.0.2
Published
string highlight
Downloads
13
Readme
str-highlight
the string for html, css and gql will be highlighted in JS
- npm
npm i str-hightlight
or
- yarn
yarn add str-hightlight
Usage
HTML
const htmlText = html`<p class="paragraph">Hello world<p>`
CSS
const styles = css`
items {
color: red
}
`
GraphQL
const { gql } = require('str-highlight');
const query = gql`
query {
id
name
}
`
// pass your query to your GraphQL Client below
- with GraphQL Request
// with GraphQL Request
const { request } = require('graphql-request')
request('https://api.graph.cool/simple/v1/movies', query).then(data =>
console.log(data)
)