Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ang-tangle

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ang-tangle - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

samples/sample-01/ang/init.litcoffee

2

bin/ang-tangle.js

@@ -9,3 +9,3 @@ #!/usr/bin/env node

#-------------------------------------------------------------------------------
# Copyright 2013 Patrick Mueller
# Copyright 2014 Patrick Mueller
#

@@ -12,0 +12,0 @@ # Licensed under the Apache License, Version 2.0 (the "License");

@@ -1,2 +0,2 @@

The angular shield came from
The angular shield came from
<https://github.com/angular/angular.js/tree/master/images/logo>

@@ -3,0 +3,0 @@ and is licensed under a

// Generated by CoffeeScript 1.6.3
var Kinds, Program, Verbose, Version, align, coffee, error, fs, getDate, getFile, log, logv, main, marked, path, pkg, processData, processScripts, processViews, sh, sourceMap, writeScript, _;
var Kinds, Program, Verbose, Version, align, coffee, error, fs, getDate, getFile, getIdentitySourceMap, log, logv, main, marked, path, pkg, processData, processScripts, processViews, sh, sourceMap, writeScript, _;

@@ -67,5 +67,5 @@ fs = require("fs");

}
processData(files);
processViews(files);
scripts = processScripts(files);
processData(iDir, files);
processViews(iDir, files);
scripts = processScripts(iDir, files);
out = [];

@@ -111,2 +111,4 @@ out.sourceNode = new sourceMap.SourceNode;

wrappedAfter = "\n";
smConsumer = new sourceMap.SourceMapConsumer(angTangleScript.sourceMap);
sourceNode = sourceMap.SourceNode.fromStringWithSourceMap(angTangleScript.js, smConsumer);
out.push(wrappedBefore);

@@ -116,3 +118,3 @@ out.push(angTangleScript.js);

out.sourceNode.add(wrappedBefore);
out.sourceNode.add(angTangleScript.js);
out.sourceNode.add(sourceNode);
out.sourceNode.add(wrappedAfter);

@@ -145,7 +147,7 @@ }

processScripts = function(files) {
var err, file, fileName, name, result, scripts;
processScripts = function(iDir, files) {
var err, file, fileName, loc, name, result, scripts, v3SourceMap, v3SsourceMap;
file = {
name: "--ang-tangle--.coffee",
full: "--ang-tangle--.coffee",
full: path.join(iDir, "--ang-tangle--.coffee"),
base: "--ang-tangle--",

@@ -169,3 +171,4 @@ type: "coffee",

result = {
js: file.contents
js: file.contents,
sourceMap: getIdentitySourceMap(file)
};

@@ -176,3 +179,3 @@ } else if (file.type === "coffee") {

filename: file.name,
sourceFiles: [file.name],
sourceFiles: [file.full],
generatedFile: "index.js",

@@ -184,7 +187,10 @@ bare: true,

err = _error;
error("error compiling CoffeeScript file " + file.full + ": " + err);
loc = "" + err.location.first_line + ":" + err.location.first_column;
error("error compiling CoffeeScript file " + file.full + ":" + loc + ": " + err);
}
v3SourceMap = JSON.parse(result.v3SourceMap);
v3SourceMap.sourcesContent = [file.contents];
result = {
js: result.js,
sourceMap: JSON.parse(result.v3SourceMap)
sourceMap: v3SourceMap
};

@@ -195,3 +201,3 @@ } else if (file.type === "litcoffee") {

filename: file.name,
sourceFiles: [file.name],
sourceFiles: [file.full],
generatedFile: "index.js",

@@ -204,7 +210,10 @@ bare: true,

err = _error;
error("error compiling Literate CoffeeScript file " + file.full + ": " + err);
loc = "" + err.location.first_line + ":" + err.location.first_column;
error("error compiling Literate CoffeeScript file " + file.full + ":" + loc + ": " + err);
}
v3SsourceMap = JSON.parse(result.v3SourceMap);
v3SsourceMap.sourcesContent = [file.contents];
result = {
js: result.js,
sourceMap: JSON.parse(result.v3SourceMap)
sourceMap: v3SsourceMap
};

@@ -220,3 +229,3 @@ }

processViews = function(files) {
processViews = function(iDir, files) {
var dirBaseName, file, html, name, views;

@@ -248,3 +257,3 @@ marked.setOptions({

name: "--views--.coffee",
full: "--views--.coffee",
full: path.join(iDir, "--views--.coffee"),
base: "--views--",

@@ -258,3 +267,3 @@ type: "coffee",

processData = function(files) {
processData = function(iDir, files) {
var data, dirBaseName, err, file, name, object;

@@ -280,3 +289,3 @@ data = {};

name: "--data--.coffee",
full: "--data--.coffee",
full: path.join(iDir, "--data--.coffee"),
base: "--data--",

@@ -290,2 +299,28 @@ type: "coffee",

getIdentitySourceMap = function(file) {
var line, lines, smg, srcMap;
smg = new sourceMap.SourceMapGenerator({
file: file.full
});
lines = file.contents.split("\n").length;
line = 0;
while (line < lines) {
line++;
smg.addMapping({
source: file.full,
original: {
line: line,
column: 0
},
generated: {
line: line,
column: 0
}
});
}
srcMap = JSON.parse(smg.toString());
srcMap.sourcesContent = [file.contents];
return srcMap;
};
Kinds = {

@@ -292,0 +327,0 @@ js: "script",

@@ -51,3 +51,3 @@ // Generated by CoffeeScript 1.6.3

help = function() {
console.log("" + pkg.name + " [options] input-directory output-file\n\n input-directory is a directory of files to ang-tangle-ize\n output-file is the name of the file to be generated\n\noptions:\n\n -v --verbose be verbose\n\nversion: " + pkg.version + "; for more info: " + pkg.homepage + " ");
console.log("" + pkg.name + " [options] input-directory output-file\n\n input-directory is a directory of files to ang-tangle-ize\n output-file is the name of the file to be generated\n\noptions:\n\n -v --verbose be verbose\n\nversion: " + pkg.version + "; for more info: " + pkg.homepage);
return process.exit(1);

@@ -54,0 +54,0 @@ };

@@ -6,4 +6,5 @@ {

"description": "tangles source files into an angular application",
"keywords": [ "angular" ],
"author": "pmuellr",
"version": "0.1.3",
"version": "0.1.4",
"licenses": [{ "type": "Apache License" }],

@@ -10,0 +11,0 @@ "dependencies":

<tt style="color:limegreen">ang-tangle</tt> - tangles source files into an angular application
================================================================================
<tt style="color:limegreen">ang-tangle</tt> is a tool that can collect your
static JavaScript, HTML, and JSON resources
<tt style="color:limegreen">ang-tangle</tt> is a tool that can collect your
static JavaScript, HTML, and JSON resources
for an [AngularJS](http://angularjs.org/)-based application

@@ -14,8 +14,4 @@ into a single .js file, and associated sourcemap for debugging.

Install globally via:
Install globally via:
sudo npm -g https://github.com/pmuellr/ang-tangle.git
or maybe the package is on npm at this point and you can use:
sudo npm -g install ang-tangle

@@ -35,10 +31,10 @@

You run <tt style="color:limegreen">ang-tangle</tt> by passing the name of a
directory which contains your angular JavaScript scripts, HTML files,
You run <tt style="color:limegreen">ang-tangle</tt> by passing the name of a
directory which contains your angular JavaScript scripts, HTML files,
and JSON data files. <tt style="color:limegreen">ang-tangle</tt> can
also handle CoffeeScript and Markdown files.
also handle CoffeeScript and Markdown files.
From here in, we'll reference this directory as the "input directory".
In your project, you should create a new directory - the input directory -
In your project, you should create a new directory - the input directory -
to store these angular resources; and just these angular resources.

@@ -55,20 +51,20 @@ <tt style="color:limegreen">ang-tangle</tt>

The input directory should have at least one script in it - `init.js`
(or `init.coffee` or `init.litcoffee`), which is a script which should
create your angular module.
The input directory should have at least one script in it - `init.js`
(or `init.coffee` or `init.litcoffee`), which is a script which should
create your angular module.
The rest of your angular scripts can be in the input directory also, or any
The rest of your angular scripts can be in the input directory also, or any
subdirectory of the input directory.
<tt style="color:limegreen">ang-tangle</tt> will also take
<tt style="color:limegreen">ang-tangle</tt> will also take
`.html` and `.md` files in any directory,
and make them available via a service named `views`.
The `views` service is an object whose properties are the names
of the `.html` or `.md` files relative to the input directory,
and the values are the contents of the files.
The `views` service is an object whose properties are the names
of the `.html` or `.md` files relative to the input directory,
and the values are the contents of the files.
<tt style="color:limegreen">ang-tangle</tt> will also take
`.json` files in any directory,
<tt style="color:limegreen">ang-tangle</tt> will also take
`.json` files in any directory,
and make them available via a service named `data`.
The `data` service is an object whose properties are the names
The `data` service is an object whose properties are the names
of the `.json` files relative to the input directory,

@@ -83,3 +79,3 @@ and values are the `JSON.parse()`d objects of those files.

Your scripts have access to a object named `AngTangle`. The `AngTangle` object
has the same methods as the
has the same methods as the
[angular `module` object](http://docs.angularjs.org/api/angular.Module), and is

@@ -89,5 +85,5 @@ bound to the module you create in the `init` script.

There is one additional method on the `AngTangle` object - `module()`, which
is used to create the module in `init` script. The signature is the same
is used to create the module in `init` script. The signature is the same
as the [`angular.module()`](http://docs.angularjs.org/api/angular.module)
function.
function.

@@ -98,3 +94,3 @@ You should create your angular module with:

just like you do with `angular.module()`.
just like you do with `angular.module()`.

@@ -122,8 +118,8 @@ If you call the `module()` function with no arguments, it will

ang-tangle [options] input-directory output-file
input-directory is a directory of files to ang-tangle-ize
output-file is the name of the file to be generated
options:
-v --verbose be verbose

@@ -133,6 +129,20 @@

samples
--------------------------------------------------------------------------------
There are two sample applications available with the project. Check the
[samples directory](https://github.com/pmuellr/ang-tangle/tree/master/samples).
You should be able to run the finished samples in your browser using the
awesome [rawgithub.com service](https://rawgithub.com/).
* <https://rawgithub.com/pmuellr/ang-tangle/master/samples/sample-01/index.html>
* <https://rawgithub.com/pmuellr/ang-tangle/master/samples/sample-02/index.html>
building <tt style="color:limegreen">ang-tangle</tt>
--------------------------------------------------------------------------------
To hack on <tt style="color:limegreen">ang-tangle</tt> code itself, you should first install
To hack on <tt style="color:limegreen">ang-tangle</tt> code itself, you should first install
[`jbuild`](https://github.com/pmuellr/jbuild). Then run

@@ -139,0 +149,0 @@ `npm install`, or course.

@@ -1,2 +0,2 @@

The angular shield came from
The angular shield came from
<https://github.com/angular/angular.js/tree/master/images/logo>

@@ -3,0 +3,0 @@ and is licensed under a

@@ -105,3 +105,3 @@ ;(function(){

//----- init.coffee
//----- init.litcoffee
;(function(AngTangle) {

@@ -108,0 +108,0 @@ AngTangle.module("app", []);

@@ -5,13 +5,15 @@ {

"sources": [
"init.coffee",
"routes.coffee",
"views/hello.coffee",
"views/home.coffee",
"--data--.coffee",
"--views--.coffee"
"samples/sample-01/ang/--ang-tangle--.coffee",
"samples/sample-01/ang/init.litcoffee",
"samples/sample-01/ang/routes.coffee",
"samples/sample-01/ang/views/hello.coffee",
"samples/sample-01/ang/views/home.coffee",
"samples/sample-01/ang/--data--.coffee",
"samples/sample-01/ang/--views--.coffee"
],
"names": [],
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,CAAU,CAAc,GAAxB,IAAS;A;;;;;;ACA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B;A",
"sourcesContent": [
"AngTangle.module \"app\", []",
"# Licensed under the Apache License. See footer for details.\n\nAngTangle =\n\n OneArgMethods: [\n \"config\"\n \"run\"\n ]\n\n TwoArgMethods: [\n \"animation\"\n \"constant\"\n \"controller\"\n \"directive\"\n \"factory\"\n \"filter\"\n \"provider\"\n \"service\"\n \"value\"\n ]\n\n\n#-------------------------------------------------------------------------------\nclass AngTangle.Init\n\n #---------------------------------------------------------------------------\n constructor: ->\n\n getOneArgFunction = (module, method) ->\n (thing) ->\n throw Error \"module not defined in init script\" unless module?\n module[method].call module, thing\n\n getTwoArgFunction = (module, method) ->\n (name, thing) ->\n throw Error \"module not defined in init script\" unless module?\n module[method].call module, name, thing\n\n for method in AngTangle.OneArgMethods\n @[method] = getOneArgFunction AngTangle.Module, method\n\n for method in AngTangle.TwoArgMethods\n @[method] = getTwoArgFunction AngTangle.Module, method\n\n\n #---------------------------------------------------------------------------\n module: (args...) ->\n\n unless args.length is 0\n throw Error \"module() method called twice\" if AngTangle.Module?\n\n AngTangle.Module = angular.module.apply(angular, args)\n\n return AngTangle.Module\n\n#-------------------------------------------------------------------------------\nclass AngTangle.Script\n\n #---------------------------------------------------------------------------\n constructor: (@module, @scriptName) ->\n\n getOneArgFunction = (module, method) ->\n (thing) ->\n throw Error \"module not defined in init script\" unless module?\n module[method].call module, thing\n\n getTwoArgFunction = (module, method, scriptName) ->\n (name, thing) ->\n unless thing\n thing = name\n name = scriptName\n\n throw Error \"module not defined in init script\" unless module?\n module[method].call module, name, thing\n\n for method in AngTangle.OneArgMethods\n @[method] = getOneArgFunction @module, method\n\n for method in AngTangle.TwoArgMethods\n @[method] = getTwoArgFunction @module, method, @scriptName\n\n return @\n\n #---------------------------------------------------------------------------\n module: () ->\n return @module\n\n#-------------------------------------------------------------------------------\n# Copyright 2014 Patrick Mueller\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#-------------------------------------------------------------------------------\n",
"this is a Literate CoffeeScript file\n------------------------------------\n\n AngTangle.module \"app\", []\n",
"AngTangle.config ($routeProvider, views) ->\n\n addRoute = (name, url=\"/#{name}\") ->\n $routeProvider.when url,\n template: views[\"views/#{name}\"]\n controller: name\n\n $routeProvider.otherwise redirectTo: \"/\"\n\n addRoute \"home\", \"/\"\n addRoute \"hello\"\n",

@@ -18,0 +20,0 @@ "AngTangle.controller ($scope) ->\n $scope.text =\n world: \"WORLD!!!\"\n",

@@ -1,2 +0,2 @@

The angular shield came from
The angular shield came from
<https://github.com/angular/angular.js/tree/master/images/logo>

@@ -3,0 +3,0 @@ and is licensed under a

@@ -5,20 +5,22 @@ {

"sources": [
"init.coffee",
"filters/LogTime.coffee",
"routes.coffee",
"services/Logger.coffee",
"views/body.coffee",
"views/home.coffee",
"views/messages.coffee",
"--data--.coffee",
"--views--.coffee"
"samples/sample-02/ang/--ang-tangle--.coffee",
"samples/sample-02/ang/init.coffee",
"samples/sample-02/ang/filters/LogTime.coffee",
"samples/sample-02/ang/routes.coffee",
"samples/sample-02/ang/services/Logger.coffee",
"samples/sample-02/ang/views/body.coffee",
"samples/sample-02/ang/views/home.coffee",
"samples/sample-02/ang/views/messages.coffee",
"samples/sample-02/ang/--data--.coffee",
"samples/sample-02/ang/--views--.coffee"
],
"names": [],
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,CAAU,CAAc,GAAxB,IAAS;A;;;;;;ACAT;;GAAiB,GAAjB,GAAS;CAEL;GAAU,IAAV;CACI;GAAK,CAAL,CAAK,GA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AAZ,EAAN,GAAkB;CAJlB,CAMA,CAAe,EAAf,CAAM,GAAS;CAAU,IAAP,CAAM,KAAN;CANlB,EAMe;CAPa;A;;;;;ACAhC,CAAU,CAAiB,IAA3B,GAAS;CAAkB,CACvB;CAAY,CACH,CAAL;CAAK,CACI,CAAL;CADC,CAEI,CAAL;KAHI;GADW;CAA3B;A;;;;;ACAA,CAAU,CAAkB,KAA5B,EAAS;CAAmB,CACxB,4BADwB;EAExB,0YAFwB;CAA5B;A",
"sourcesContent": [
"# Licensed under the Apache License. See footer for details.\n\nAngTangle =\n\n OneArgMethods: [\n \"config\"\n \"run\"\n ]\n\n TwoArgMethods: [\n \"animation\"\n \"constant\"\n \"controller\"\n \"directive\"\n \"factory\"\n \"filter\"\n \"provider\"\n \"service\"\n \"value\"\n ]\n\n\n#-------------------------------------------------------------------------------\nclass AngTangle.Init\n\n #---------------------------------------------------------------------------\n constructor: ->\n\n getOneArgFunction = (module, method) ->\n (thing) ->\n throw Error \"module not defined in init script\" unless module?\n module[method].call module, thing\n\n getTwoArgFunction = (module, method) ->\n (name, thing) ->\n throw Error \"module not defined in init script\" unless module?\n module[method].call module, name, thing\n\n for method in AngTangle.OneArgMethods\n @[method] = getOneArgFunction AngTangle.Module, method\n\n for method in AngTangle.TwoArgMethods\n @[method] = getTwoArgFunction AngTangle.Module, method\n\n\n #---------------------------------------------------------------------------\n module: (args...) ->\n\n unless args.length is 0\n throw Error \"module() method called twice\" if AngTangle.Module?\n\n AngTangle.Module = angular.module.apply(angular, args)\n\n return AngTangle.Module\n\n#-------------------------------------------------------------------------------\nclass AngTangle.Script\n\n #---------------------------------------------------------------------------\n constructor: (@module, @scriptName) ->\n\n getOneArgFunction = (module, method) ->\n (thing) ->\n throw Error \"module not defined in init script\" unless module?\n module[method].call module, thing\n\n getTwoArgFunction = (module, method, scriptName) ->\n (name, thing) ->\n unless thing\n thing = name\n name = scriptName\n\n throw Error \"module not defined in init script\" unless module?\n module[method].call module, name, thing\n\n for method in AngTangle.OneArgMethods\n @[method] = getOneArgFunction @module, method\n\n for method in AngTangle.TwoArgMethods\n @[method] = getTwoArgFunction @module, method, @scriptName\n\n return @\n\n #---------------------------------------------------------------------------\n module: () ->\n return @module\n\n#-------------------------------------------------------------------------------\n# Copyright 2014 Patrick Mueller\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#-------------------------------------------------------------------------------\n",
"AngTangle.module \"app\", []",
"AngTangle.filter ->\n\n LogTime = (date) -> \n hh = right \"#{date.getHours()}\", 2, 0\n mm = right \"#{date.getMinutes()}\", 2, 0\n ss = right \"#{date.getSeconds()}\", 2, 0\n return \"#{hh}:#{mm}:#{ss}\"\n\n#-------------------------------------------------------------------------------\nright = (string, len, pad) ->\n while string.length < len\n string = \"#{pad}#{string}\"\n return string\n",
"AngTangle.filter ->\n\n LogTime = (date) ->\n hh = right \"#{date.getHours()}\", 2, 0\n mm = right \"#{date.getMinutes()}\", 2, 0\n ss = right \"#{date.getSeconds()}\", 2, 0\n return \"#{hh}:#{mm}:#{ss}\"\n\n#-------------------------------------------------------------------------------\nright = (string, len, pad) ->\n while string.length < len\n string = \"#{pad}#{string}\"\n return string\n",
"AngTangle.config routes = ($routeProvider, views) ->\n\n addRoute = (name, url=\"/#{name}\") ->\n $routeProvider.when url,\n template: views[\"views/#{name}\"]\n controller: name\n\n $routeProvider.otherwise redirectTo: \"/\"\n\n addRoute \"home\", \"/\"\n addRoute \"messages\"\n\n",
"AngTangle.service class Logger\n\n #---------------------------------------------------------------------------\n constructor: () ->\n @_verbose = false\n @_messages = []\n\n #---------------------------------------------------------------------------\n getMessages: () ->\n return @_messages\n\n #---------------------------------------------------------------------------\n verbose: (value) ->\n return @_verbose if !value? \n\n @_verbose = !!value\n return @_verbose\n\n #---------------------------------------------------------------------------\n log: (text) ->\n date = new Date\n @_messages.push {date, text}\n\n return\n\n #---------------------------------------------------------------------------\n vlog: (text) ->\n return unless @_verbose\n\n log text\n return\n\n #---------------------------------------------------------------------------\n clear: ->\n @_messages.splice 0, @_messages.length\n",
"AngTangle.controller body = ($scope, Logger) ->\n Logger.log \"created body controller\"\n\n $scope.messages = Logger.getMessages()\n\n subTitle = \"\"\n\n $scope.getSubtitle = -> \n return \"\" if subTitle is \"\"\n return \": #{subTitle}\"\n\n $scope.setSubtitle = (s) -> \n subTitle = s\n",
"AngTangle.service class Logger\n\n #---------------------------------------------------------------------------\n constructor: () ->\n @_verbose = false\n @_messages = []\n\n #---------------------------------------------------------------------------\n getMessages: () ->\n return @_messages\n\n #---------------------------------------------------------------------------\n verbose: (value) ->\n return @_verbose if !value?\n\n @_verbose = !!value\n return @_verbose\n\n #---------------------------------------------------------------------------\n log: (text) ->\n date = new Date\n @_messages.push {date, text}\n\n return\n\n #---------------------------------------------------------------------------\n vlog: (text) ->\n return unless @_verbose\n\n log text\n return\n\n #---------------------------------------------------------------------------\n clear: ->\n @_messages.splice 0, @_messages.length\n",
"AngTangle.controller body = ($scope, Logger) ->\n Logger.log \"created body controller\"\n\n $scope.messages = Logger.getMessages()\n\n subTitle = \"\"\n\n $scope.getSubtitle = ->\n return \"\" if subTitle is \"\"\n return \": #{subTitle}\"\n\n $scope.setSubtitle = (s) ->\n subTitle = s\n",
"AngTangle.controller home = ($scope, Logger) ->\n Logger.log \"created home controller\"\n\n $scope.setSubtitle \"\"\n\n",

@@ -25,0 +27,0 @@ "AngTangle.controller messages = ($scope, Logger) ->\n Logger.log \"created messages controller\"\n\n $scope.setSubtitle \"messages\"\n\n $scope.messages = Logger.getMessages()\n\n $scope.clear = -> Logger.clear()\n\n return\n",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc