## How to use


stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
20Apr 12, 2018Feb 21, 2018Minified + gzip package size for 221-prismic in KB



How to use

Import package :

let Content = require('221-prismic')

Get data from all documents :

const content = new Content({
    baseUrl: 'myprismicrepo',
    debug: true,
    lang: 'fr-fr'

Error callback :

content.onError((err) => {
    console.log("Something went wrong: ", err)

Success callback (got data) :

content.onReady(() => {
    console.log("Got data")

Get all keys:

var key = content.get()

Get keys of doc:

var key = content.get('header')

Get specific keys of doc:

var key = content.get('header.item1')


Github : https://github.com/Studio221/221-Prismic

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.