Socket
Socket
Sign inDemoInstall

nestable-quasis

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nestable-quasis - npm Package Compare versions

Comparing version 0.1.0 to 1.0.0

gulpfile.js

54

lib/nestable-quasis.js

@@ -0,1 +1,7 @@

'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = nestableQuasis;
/*

@@ -16,34 +22,14 @@ This program is free software: you can redistribute it and/or modify

'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.default = nestableQuasis;
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; return arr2; } else { return Array.from(arr); } }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
function newNQClass() {
return (function () {
var _class = function (_ref) {
var literals = _ref.literals;
var substitutions = _ref.substitutions;
_classCallCheck(this, _class);
return class {
constructor({ literals, substitutions }) {
this.literals = literals;
this.substitutions = substitutions;
};
return _class;
})();
}
};
}
function nestableQuasis() {
var cl = arguments[0] === undefined ? newNQClass() : arguments[0];
return function (literals) {
var flatLiterals = [],
function nestableQuasis(cl = newNQClass()) {
return function (literals, ...substitutions) {
let flatLiterals = [],
flatSubstitutions = [],

@@ -54,7 +40,2 @@ i = 0,

nextLiteral += literals[i];
for (var _len = arguments.length, substitutions = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
substitutions[_key - 1] = arguments[_key];
}
if (i === substitutions.length) {

@@ -68,6 +49,6 @@ flatLiterals.push(nextLiteral);

} else {
var newLiterals = substitutions[i].literals;
flatLiterals.push.apply(flatLiterals, [nextLiteral + newLiterals[0]].concat(_toConsumableArray(newLiterals.slice(1))));
let newLiterals = substitutions[i].literals;
flatLiterals.push(nextLiteral + newLiterals[0], ...newLiterals.slice(1));
nextLiteral = flatLiterals.pop();
flatSubstitutions.push.apply(flatSubstitutions, _toConsumableArray(substitutions[i].substitutions));
flatSubstitutions.push(...substitutions[i].substitutions);
}

@@ -79,3 +60,2 @@ i++;

}
module.exports = exports.default;
//# sourceMappingURL=nestable-quasis.js.map
{
"name": "nestable-quasis",
"version": "0.1.0",
"version": "1.0.0",
"description": "ES6 quasi tags for flattening nested quasis into single lists of literals and substitutions",
"main": "lib/nestable-quasis.js",
"scripts": {
"build": "babel src --out-dir lib --whitelist es6.classes,es6.modules,es6.blockScoping,es6.properties.shorthand,es6.spread,es6.parameters,es6.destructuring,spec.undefinedToVoid,strict",
"build": "node_modules/.bin/gulp build",
"prepublish": "$npm_package_scripts_build"
},
"repository": {
"type": "git",
"url": "https://github.com/rschaosid/node-nestable-quasis.git"
},
"author": "rschaosid <rschaosid@gmail.com>",
"license": "GPLv3",
"bugs": {
"url": "https://github.com/rschaosid/node-nestable-quasis/issues"
},
"homepage": "https://github.com/rschaosid/node-nestable-quasis",
"devDependencies": {
"babel": "^5.6.14"
"babel-core": "^6.9.1",
"babel-plugin-transform-async-to-generator": "^6.8.0",
"babel-plugin-transform-class-properties": "^6.9.1",
"babel-plugin-transform-do-expressions": "^6.8.0",
"babel-plugin-transform-es2015-modules-commonjs": "^6.8.0",
"babel-plugin-transform-exponentiation-operator": "^6.8.0",
"babel-plugin-transform-export-extensions": "^6.8.0",
"babel-plugin-transform-function-bind": "^6.8.0",
"babel-plugin-transform-object-rest-spread": "^6.8.0",
"babel-plugin-transform-strict-mode": "^6.8.0",
"gulp": "^3.9.1",
"gulp-babel": "^6.1.2",
"gulp-plumber": "^1.1.0",
"gulp-sourcemaps": "^1.6.0",
"gulp-watch": "^4.3.6"
}
}
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