UNPKG

@eastsideco/escshopify

Version:

WIP JS library for Shopify, containing a variety of useful functionality.

875 lines 19.3 kB
{ "type": "File", "start": 0, "end": 113, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 6, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 113, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 6, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ExportDefaultDeclaration", "start": 15, "end": 112, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 5, "column": 2 } }, "declaration": { "type": "ObjectExpression", "start": 30, "end": 111, "loc": { "start": { "line": 2, "column": 15 }, "end": { "line": 5, "column": 1 } }, "properties": [ { "type": "ObjectProperty", "start": 36, "end": 79, "loc": { "start": { "line": 3, "column": 4 }, "end": { "line": 3, "column": 47 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 36, "end": 41, "loc": { "start": { "line": 3, "column": 4 }, "end": { "line": 3, "column": 9 }, "identifierName": "debug" }, "name": "debug", "leadingComments": null }, "value": { "type": "BinaryExpression", "start": 43, "end": 79, "loc": { "start": { "line": 3, "column": 11 }, "end": { "line": 3, "column": 47 } }, "left": { "type": "MemberExpression", "start": 43, "end": 63, "loc": { "start": { "line": 3, "column": 11 }, "end": { "line": 3, "column": 31 } }, "object": { "type": "MemberExpression", "start": 43, "end": 54, "loc": { "start": { "line": 3, "column": 11 }, "end": { "line": 3, "column": 22 } }, "object": { "type": "Identifier", "start": 43, "end": 50, "loc": { "start": { "line": 3, "column": 11 }, "end": { "line": 3, "column": 18 }, "identifierName": "process" }, "name": "process" }, "property": { "type": "Identifier", "start": 51, "end": 54, "loc": { "start": { "line": 3, "column": 19 }, "end": { "line": 3, "column": 22 }, "identifierName": "env" }, "name": "env" }, "computed": false }, "property": { "type": "Identifier", "start": 55, "end": 63, "loc": { "start": { "line": 3, "column": 23 }, "end": { "line": 3, "column": 31 }, "identifierName": "NODE_ENV" }, "name": "NODE_ENV" }, "computed": false }, "operator": "!=", "right": { "type": "StringLiteral", "start": 67, "end": 79, "loc": { "start": { "line": 3, "column": 35 }, "end": { "line": 3, "column": 47 } }, "extra": { "rawValue": "production", "raw": "'production'" }, "value": "production" } }, "leadingComments": null }, { "type": "ObjectProperty", "start": 85, "end": 108, "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 4, "column": 27 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 85, "end": 94, "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 4, "column": 13 }, "identifierName": "logPrefix" }, "name": "logPrefix" }, "value": { "type": "StringLiteral", "start": 96, "end": 108, "loc": { "start": { "line": 4, "column": 15 }, "end": { "line": 4, "column": 27 } }, "extra": { "rawValue": "escshopify", "raw": "'escshopify'" }, "value": "escshopify" } } ], "leadingComments": [ { "type": "CommentBlock", "value": "* @ignore ", "start": 0, "end": 14, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } } ], "trailingComments": [] }, "leadingComments": [ { "type": "CommentBlock", "value": "* @ignore ", "start": 0, "end": 14, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } } ] } ], "directives": [] }, "comments": [ { "type": "CommentBlock", "value": "* @ignore ", "start": 0, "end": 14, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } } ], "tokens": [ { "type": "CommentBlock", "value": "* @ignore ", "start": 0, "end": 14, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } }, { "type": { "label": "export", "keyword": "export", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "export", "start": 15, "end": 21, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 6 } } }, { "type": { "label": "default", "keyword": "default", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "default", "start": 22, "end": 29, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 14 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 30, "end": 31, "loc": { "start": { "line": 2, "column": 15 }, "end": { "line": 2, "column": 16 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "debug", "start": 36, "end": 41, "loc": { "start": { "line": 3, "column": 4 }, "end": { "line": 3, "column": 9 } } }, { "type": { "label": ":", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 41, "end": 42, "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 10 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "process", "start": 43, "end": 50, "loc": { "start": { "line": 3, "column": 11 }, "end": { "line": 3, "column": 18 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 50, "end": 51, "loc": { "start": { "line": 3, "column": 18 }, "end": { "line": 3, "column": 19 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "env", "start": 51, "end": 54, "loc": { "start": { "line": 3, "column": 19 }, "end": { "line": 3, "column": 22 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 54, "end": 55, "loc": { "start": { "line": 3, "column": 22 }, "end": { "line": 3, "column": 23 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "NODE_ENV", "start": 55, "end": 63, "loc": { "start": { "line": 3, "column": 23 }, "end": { "line": 3, "column": 31 } } }, { "type": { "label": "==/!=", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": 6, "updateContext": null }, "value": "!=", "start": 64, "end": 66, "loc": { "start": { "line": 3, "column": 32 }, "end": { "line": 3, "column": 34 } } }, { "type": { "label": "string", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "production", "start": 67, "end": 79, "loc": { "start": { "line": 3, "column": 35 }, "end": { "line": 3, "column": 47 } } }, { "type": { "label": ",", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 79, "end": 80, "loc": { "start": { "line": 3, "column": 47 }, "end": { "line": 3, "column": 48 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "logPrefix", "start": 85, "end": 94, "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 4, "column": 13 } } }, { "type": { "label": ":", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 94, "end": 95, "loc": { "start": { "line": 4, "column": 13 }, "end": { "line": 4, "column": 14 } } }, { "type": { "label": "string", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "escshopify", "start": 96, "end": 108, "loc": { "start": { "line": 4, "column": 15 }, "end": { "line": 4, "column": 27 } } }, { "type": { "label": ",", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 108, "end": 109, "loc": { "start": { "line": 4, "column": 27 }, "end": { "line": 4, "column": 28 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 110, "end": 111, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 1 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 111, "end": 112, "loc": { "start": { "line": 5, "column": 1 }, "end": { "line": 5, "column": 2 } } }, { "type": { "label": "eof", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 113, "end": 113, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 0 } } } ] }