Socket
Socket
Sign inDemoInstall

stringify

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stringify - npm Package Compare versions

Comparing version 5.1.0 to 5.2.0

.travis.yml

2

gulpfile.js

@@ -31,1 +31,3 @@ 'use strict';

});
gulp.task('default', ['lint', 'test']);
'use strict';
module.exports = require('./src/stringify');

7

package.json
{
"name": "stringify",
"description": "Browserify middleware to be able to require() text files (including templates) inside of your client-side JavaScript files.",
"version": "5.1.0",
"version": "5.2.0",
"main": "./index.js",

@@ -14,3 +14,4 @@ "author": "John Postlethwait <john.postlethwait@gmail.com>",

"Michaelangelo Jong <mike96angelo@gmail.com>",
"Matthew Dunsdon <matthewdunsdon@gmail.com>"
"Matthew Dunsdon <matthewdunsdon@gmail.com>",
"Ugo Stephant <ugo@poool.fr>"
],

@@ -37,3 +38,3 @@ "website": "http://johnpostlethwait.github.com/stringify/",

"browserify-transform-tools": "^1.5.3",
"html-minifier": "1.1.1"
"html-minifier": "3.5.2"
},

@@ -40,0 +41,0 @@ "devDependencies": {

# Stringify #
_**NOTE:** I no longer actively maintain this package. I'd love to get PRs to keep it going though!_
[![NPM](https://nodei.co/npm/stringify.png?downloads&downloadRank)](https://nodei.co/npm/stringify/)
[![Build Status][travis-image]][travis-url]

@@ -9,3 +12,3 @@ Browserify plugin to require() text files (such as HTML templates) inside of

*NOTE:* Has not been tested on Node below version 4.0.0, and has been tested up
to Node 5.5.0. Please report (or put a Pull Request up for) any bugs you may
to Node 8.1.3. Please report (or put a Pull Request up for) any bugs you may
find.

@@ -90,3 +93,3 @@

stringify.registerWithRequire({
extensions: ['.txt', '.html'],
appliesTo: { includeExtensions: ['.txt', '.html'] },
minify: true,

@@ -106,2 +109,6 @@ minifyAppliesTo: {

For NodeJS, the __appliesTo__ configuration option only supports the
__includeExtensions__ option - see _Including / Excluding Files_ section for
further details.
## Configuration ##

@@ -307,1 +314,4 @@

* Place a space after a conditional or function name, and its conditions/arguments. `function (...) {...}`
[travis-url]: https://travis-ci.org/JohnPostlethwait/stringify
[travis-image]: https://img.shields.io/travis/JohnPostlethwait/stringify.svg

@@ -91,17 +91,7 @@ 'use strict';

*/
function getExtensions (options) {
/**
* The file extensions which are stringified by default.
* @type {string[]}
*/
function getRequireExtensions (options) {
var extensions = TRANSFORM_OPTIONS.includeExtensions;
if (options) {
if (Object.prototype.toString.call(options) === '[object Array]') {
extensions = options;
} else if (options.extensions && options.extensions._) {
extensions = options.extensions._;
} else if(options.extensions) {
extensions = options.extensions;
}
if (options && options.appliesTo && options.appliesTo.includeExtensions) {
extensions = options.appliesTo.includeExtensions;
}

@@ -189,5 +179,5 @@

function registerWithRequire (options) {
NODE_REQUIRE_OPTIONS = options || {};
NODE_REQUIRE_OPTIONS = getTransformOptions(options);
var exts = getExtensions(NODE_REQUIRE_OPTIONS);
var exts = getRequireExtensions(NODE_REQUIRE_OPTIONS);

@@ -259,3 +249,3 @@ for (var i = 0; i < exts.length; i++) {

module.exports.stringify = stringify;
module.exports.getExtensions = getExtensions;
module.exports.getRequireExtensions = getRequireExtensions;
module.exports.getTransformOptions = getTransformOptions;

@@ -262,0 +252,0 @@ module.exports.TRANSFORM_OPTIONS = TRANSFORM_OPTIONS;

This is a mock text file for the test fixtures!

@@ -0,0 +0,0 @@ /* jshint expr: true */

@@ -0,0 +0,0 @@ /* jshint expr: true */

@@ -0,0 +0,0 @@ /* jshint expr: true */

@@ -0,0 +0,0 @@ /* jshint expr: true */

@@ -0,0 +0,0 @@ /* jshint expr: true */

@@ -0,0 +0,0 @@ /* jshint expr: true */

@@ -0,0 +0,0 @@ /* jshint expr: true */

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