diff --git a/LICENSE b/LICENSE index f07a849..1f04b81 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,7 @@ The MIT License (MIT) Copyright (c) Juga Paazmaya (https://paazmaya.fi) +Copyright (c) David Kevork (https://davidkevork.me) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/index.js b/index.js index b73ee30..f0073ad 100644 --- a/index.js +++ b/index.js @@ -1,17 +1,17 @@ /** - * shuji (周氏) - * https://github.com/paazmaya/shuji + * reverse.js + * https://github.com/davidkevork/reverse * * Reverse engineering JavaScript and CSS sources from sourcemaps * * Copyright (c) Juga Paazmaya (https://paazmaya.fi) + * Copyright (c) David Kevork (https://davidkevork.me) * Licensed under the MIT license */ 'use strict'; const path = require('path'); - const sourceMap = require('source-map'); /** @@ -33,7 +33,7 @@ module.exports = (input, options) => { consumer.sources.forEach((source) => { const contents = consumer.sourceContentFor(source); - map[path.basename(source)] = contents; + map[path.normalize(source).replace(/^(\.\.[/\\])+/, '').replace(/(\?).*$/, '').replace(/[&#,+()$~%'":*?<>{}]/g, '').replace(' ', '.')] = contents; }); } else if (options.verbose) { diff --git a/tests/cli_test.js b/tests/cli_test.js index 04c4589..056f999 100644 --- a/tests/cli_test.js +++ b/tests/cli_test.js @@ -1,17 +1,18 @@ /** - * shuji (周氏) - * https://github.com/paazmaya/shuji + * reverse.js + * https://github.com/davidkevork/reverse * * Reverse engineering JavaScript and CSS sources from sourcemaps * * Copyright (c) Juga Paazmaya (https://paazmaya.fi) + * Copyright (c) David Kevork (https://davidkevork.me) * Licensed under the MIT license */ 'use strict'; -const fs = require('fs'), - path = require('path'), - execFile = require('child_process').execFile; +const fs = require('fs'); +const path = require('path'); +const execFile = require('child_process').execFile; const tape = require('tape'); diff --git a/tests/index_test.js b/tests/index_test.js index f5af896..f6126a2 100644 --- a/tests/index_test.js +++ b/tests/index_test.js @@ -1,16 +1,17 @@ /** - * shuji (周氏) - * https://github.com/paazmaya/shuji + * reverse.js + * https://github.com/davidkevork/reverse * * Reverse engineering JavaScript and CSS sources from sourcemaps * * Copyright (c) Juga Paazmaya (https://paazmaya.fi) + * Copyright (c) David Kevork (https://davidkevork.me) * Licensed under the MIT license */ 'use strict'; -const tape = require('tape'), - shuji = require('../index'); +const tape = require('tape'); +const shuji = require('../index'); tape('function is exported', (test) => { test.plan(1);