UNPKG

@eastsideco/escshopify

Version:

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

1,326 lines 31 kB
{ "type": "File", "start": 0, "end": 103, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 9, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 103, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 9, "column": 0 } }, "sourceType": "module", "body": [ { "type": "Identifier", "start": 0, "end": 65, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 5, "column": 1 } }, "id": { "type": "Identifier", "start": 6, "end": 10, "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 10 }, "identifierName": "Test" }, "name": "Test" }, "superClass": null, "body": { "type": "ClassBody", "start": 11, "end": 65, "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 5, "column": 1 } }, "body": [ { "type": "ClassMethod", "start": 17, "end": 63, "loc": { "start": { "line": 2, "column": 4 }, "end": { "line": 4, "column": 5 } }, "static": false, "computed": false, "key": { "type": "Identifier", "start": 17, "end": 28, "loc": { "start": { "line": 2, "column": 4 }, "end": { "line": 2, "column": 15 }, "identifierName": "constructor" }, "name": "constructor" }, "kind": "constructor", "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 31, "end": 63, "loc": { "start": { "line": 2, "column": 18 }, "end": { "line": 4, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 41, "end": 57, "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 24 } }, "expression": { "type": "AssignmentExpression", "start": 41, "end": 56, "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 23 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 41, "end": 50, "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 17 } }, "object": { "type": "ThisExpression", "start": 41, "end": 45, "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 12 } } }, "property": { "type": "Identifier", "start": 46, "end": 50, "loc": { "start": { "line": 3, "column": 13 }, "end": { "line": 3, "column": 17 }, "identifierName": "test" }, "name": "test" }, "computed": false }, "right": { "type": "StringLiteral", "start": 53, "end": 56, "loc": { "start": { "line": 3, "column": 20 }, "end": { "line": 3, "column": 23 } }, "extra": { "rawValue": "a", "raw": "'a'" }, "value": "a" } } } ], "directives": [] } } ] }, "name": "_", "leadingComments": [], "trailingComments": [] }, { "type": "Identifier", "start": 67, "end": 84, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 17 } }, "declarations": [ { "type": "VariableDeclarator", "start": 71, "end": 83, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 16 } }, "id": { "type": "Identifier", "start": 71, "end": 72, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 5 }, "identifierName": "_" }, "name": "_" }, "init": { "type": "NewExpression", "start": 75, "end": 83, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 16 } }, "callee": { "type": "Identifier", "start": 79, "end": 83, "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 7, "column": 16 }, "identifierName": "Test" }, "name": "Test" }, "arguments": [] } } ], "kind": "let", "name": "_", "leadingComments": [], "trailingComments": [] }, { "type": "Identifier", "start": 85, "end": 102, "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 8, "column": 17 } }, "declaration": { "type": "Identifier", "start": 100, "end": 101, "loc": { "start": { "line": 8, "column": 15 }, "end": { "line": 8, "column": 16 }, "identifierName": "_" }, "name": "_" }, "name": "_", "leadingComments": [], "trailingComments": [] }, { "type": "ExportDefaultDeclaration", "start": 85, "end": 102, "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 8, "column": 17 } }, "declaration": { "type": "ClassDeclaration", "start": 0, "end": 65, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 5, "column": 1 } }, "id": { "type": "Identifier", "start": 6, "end": 10, "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 10 }, "identifierName": "Test" }, "name": "Test" }, "superClass": null, "body": { "type": "ClassBody", "start": 11, "end": 65, "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 5, "column": 1 } }, "body": [ { "type": "ClassMethod", "start": 17, "end": 63, "loc": { "start": { "line": 2, "column": 4 }, "end": { "line": 4, "column": 5 } }, "static": false, "computed": false, "key": { "type": "Identifier", "start": 17, "end": 28, "loc": { "start": { "line": 2, "column": 4 }, "end": { "line": 2, "column": 15 }, "identifierName": "constructor" }, "name": "constructor" }, "kind": "constructor", "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 31, "end": 63, "loc": { "start": { "line": 2, "column": 18 }, "end": { "line": 4, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 41, "end": 57, "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 24 } }, "expression": { "type": "AssignmentExpression", "start": 41, "end": 56, "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 23 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 41, "end": 50, "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 17 } }, "object": { "type": "ThisExpression", "start": 41, "end": 45, "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 12 } } }, "property": { "type": "Identifier", "start": 46, "end": 50, "loc": { "start": { "line": 3, "column": 13 }, "end": { "line": 3, "column": 17 }, "identifierName": "test" }, "name": "test" }, "computed": false }, "right": { "type": "StringLiteral", "start": 53, "end": 56, "loc": { "start": { "line": 3, "column": 20 }, "end": { "line": 3, "column": 23 } }, "extra": { "rawValue": "a", "raw": "'a'" }, "value": "a" } } } ], "directives": [] } } ] }, "__PseudoExport__": true, "leadingComments": [], "trailingComments": [] }, "leadingComments": null }, { "type": "ExportDefaultDeclaration", "start": 85, "end": 102, "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 8, "column": 17 } }, "declaration": { "type": "VariableDeclaration", "kind": "let", "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 8, "column": 17 } }, "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "_" }, "init": { "type": "NewExpression", "callee": { "type": "Identifier", "name": "Test" } } } ], "leadingComments": [], "trailingComments": [] } } ], "directives": [] }, "comments": [], "tokens": [ { "type": { "label": "class", "keyword": "class", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "class", "start": 0, "end": 5, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "Test", "start": 6, "end": 10, "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 10 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 11, "end": 12, "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "constructor", "start": 17, "end": 28, "loc": { "start": { "line": 2, "column": 4 }, "end": { "line": 2, "column": 15 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 28, "end": 29, "loc": { "start": { "line": 2, "column": 15 }, "end": { "line": 2, "column": 16 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 29, "end": 30, "loc": { "start": { "line": 2, "column": 16 }, "end": { "line": 2, "column": 17 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 31, "end": 32, "loc": { "start": { "line": 2, "column": 18 }, "end": { "line": 2, "column": 19 } } }, { "type": { "label": "this", "keyword": "this", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "this", "start": 41, "end": 45, "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 12 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 45, "end": 46, "loc": { "start": { "line": 3, "column": 12 }, "end": { "line": 3, "column": 13 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "test", "start": 46, "end": 50, "loc": { "start": { "line": 3, "column": 13 }, "end": { "line": 3, "column": 17 } } }, { "type": { "label": "=", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": true, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "=", "start": 51, "end": 52, "loc": { "start": { "line": 3, "column": 18 }, "end": { "line": 3, "column": 19 } } }, { "type": { "label": "string", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "a", "start": 53, "end": 56, "loc": { "start": { "line": 3, "column": 20 }, "end": { "line": 3, "column": 23 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 56, "end": 57, "loc": { "start": { "line": 3, "column": 23 }, "end": { "line": 3, "column": 24 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 62, "end": 63, "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 4, "column": 5 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 64, "end": 65, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 1 } } }, { "type": { "label": "let", "keyword": "let", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "let", "start": 67, "end": 70, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 3 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "_", "start": 71, "end": 72, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 5 } } }, { "type": { "label": "=", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": true, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "=", "start": 73, "end": 74, "loc": { "start": { "line": 7, "column": 6 }, "end": { "line": 7, "column": 7 } } }, { "type": { "label": "new", "keyword": "new", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "new", "start": 75, "end": 78, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 11 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "Test", "start": 79, "end": 83, "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 7, "column": 16 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 83, "end": 84, "loc": { "start": { "line": 7, "column": 16 }, "end": { "line": 7, "column": 17 } } }, { "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": 85, "end": 91, "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 8, "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": 92, "end": 99, "loc": { "start": { "line": 8, "column": 7 }, "end": { "line": 8, "column": 14 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "_", "start": 100, "end": 101, "loc": { "start": { "line": 8, "column": 15 }, "end": { "line": 8, "column": 16 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 101, "end": 102, "loc": { "start": { "line": 8, "column": 16 }, "end": { "line": 8, "column": 17 } } }, { "type": { "label": "eof", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 103, "end": 103, "loc": { "start": { "line": 9, "column": 0 }, "end": { "line": 9, "column": 0 } } } ] }