1.0.2 • Published 5 years ago

str-highlight v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

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)
)