Sitelet https://github.com/tcorral/JSONC/issues/1
Skip to content

gzip has no method zip #1

Description

@benzmuircroft

I've npm installed jsoncomp

but something is wrong...

I can do JSONC.compress and JSONC.decompress they both worked strait away no problem. all I needed to do was

var JSONC=require('jsoncomp/src/JSONC.js') 

But as soon as tired to do JSON.pack it would say Base64 is undefined

So I went into JSONC.js and added

var Base64=null;

  isNodeEnvironment = typeof exports === 'object' && typeof module === 'object' && typeof module.exports === 'object' && typeof require === 'function';
  if(isNodeEnvironment===true){
    Base64=require('../vendor/base64.js');
    }

then it says it the same about gzip, so i do the same with gzip...

then it says gzip has no method zip!?

console.dir says gzip looks like this:

{ gzip:
   { zip: [Function: zip],
     unzip: [Function: unzip],
     DEFAULT_LEVEL: [Getter] } }

What is wrong? Are there instructions to start using this?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions