prismicio / javascript-kit

Development kit for the Javascript language
https://developers.prismic.io
106 stars 69 forks source link

Why Prismic returned as property when require? #89

Closed bichotll closed 9 years ago

bichotll commented 9 years ago

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

erwan commented 9 years ago

Hi,

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