prismicio / javascript-kit

Development kit for the Javascript language

Home Page:https://developers.prismic.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why Prismic returned as property when require?

bichotll opened this issue · comments

Hi guys, just curious.

Why does you library have a Prismic property with the library itself?

var Prismic = require('prismic.io').Prismic
import {Prismic} from 'prismic.io';

Cheers,
jaume

Hi,

It's because it can also be used in-browser, and in this case it becomes window.Prismic.