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

@emmetio/field-parser

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@emmetio/field-parser - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

dist/field-parser.cjs.js.map

15

dist/field-parser.cjs.js

@@ -8,3 +8,3 @@ 'use strict';

var StreamReader = _interopDefault(require('@emmetio/stream-reader'));
var _emmetio_streamReaderUtils = require('@emmetio/stream-reader-utils');
var streamReaderUtils = require('@emmetio/stream-reader-utils');

@@ -19,3 +19,3 @@ const DOLLAR = 36; // $

* Finds fields in given string and returns object with field-less string
* and array of fileds found
* and array of fields found
* @param {String} string

@@ -98,4 +98,4 @@ * @return {Object}

* @param {Number} location Field location in *clean* string
* @return {Object} Object with `index` and `placeholder` properties if
* fieald was successfully consumed, `null` otherwise
* @return {Field} Object with `index` and `placeholder` properties if
* field was successfully consumed, `null` otherwise
*/

@@ -172,3 +172,3 @@ function consumeField(stream, location) {

stream.start = stream.pos;
if (stream.eatWhile(_emmetio_streamReaderUtils.isNumber)) {
if (stream.eatWhile(streamReaderUtils.isNumber)) {
return Number(stream.current());

@@ -202,8 +202,9 @@ }

toString() {
return string;
return this.string;
}
}
exports['default'] = parse;
exports.default = parse;
exports.mark = mark;
exports.createToken = createToken;
//# sourceMappingURL=field-parser.cjs.js.map

@@ -12,3 +12,3 @@ import StreamReader from '@emmetio/stream-reader';

* Finds fields in given string and returns object with field-less string
* and array of fileds found
* and array of fields found
* @param {String} string

@@ -91,4 +91,4 @@ * @return {Object}

* @param {Number} location Field location in *clean* string
* @return {Object} Object with `index` and `placeholder` properties if
* fieald was successfully consumed, `null` otherwise
* @return {Field} Object with `index` and `placeholder` properties if
* field was successfully consumed, `null` otherwise
*/

@@ -194,6 +194,8 @@ function consumeField(stream, location) {

toString() {
return string;
return this.string;
}
}
export { mark, createToken };export default parse;
export default parse;
export { mark, createToken };
//# sourceMappingURL=field-parser.es.js.map

@@ -14,3 +14,3 @@ 'use strict';

* Finds fields in given string and returns object with field-less string
* and array of fileds found
* and array of fields found
* @param {String} string

@@ -93,4 +93,4 @@ * @return {Object}

* @param {Number} location Field location in *clean* string
* @return {Object} Object with `index` and `placeholder` properties if
* fieald was successfully consumed, `null` otherwise
* @return {Field} Object with `index` and `placeholder` properties if
* field was successfully consumed, `null` otherwise
*/

@@ -196,4 +196,4 @@ function consumeField(stream, location) {

toString() {
return string;
return this.string;
}
}
{
"name": "@emmetio/field-parser",
"version": "0.3.0",
"version": "0.3.1",
"description": "Parses snippet fields (aka tab-stops) like `${1:foo}` in given string",

@@ -10,2 +10,3 @@ "main": "dist/field-parser.cjs.js",

"build": "rollup -c",
"pretest": "npm run build",
"prepublish": "npm run test && npm run build"

@@ -29,11 +30,9 @@ },

"devDependencies": {
"babel-plugin-transform-es2015-modules-commonjs": "^6.18.0",
"babel-register": "^6.18.0",
"mocha": "^3.1.2",
"rollup": "^0.41.1"
"mocha": "^5.0.5",
"rollup": "^0.57.1"
},
"dependencies": {
"@emmetio/stream-reader": "^2.0.0",
"@emmetio/stream-reader": "^2.2.0",
"@emmetio/stream-reader-utils": "^0.1.0"
}
}
export default {
entry: './index.js',
exports: 'named',
input: './index.js',
external: [

@@ -8,6 +7,12 @@ '@emmetio/stream-reader',

],
targets: [
{format: 'cjs', dest: 'dist/field-parser.cjs.js'},
{format: 'es', dest: 'dist/field-parser.es.js'}
]
output: [{
format: 'cjs',
sourcemap: true,
exports: 'named',
file: 'dist/field-parser.cjs.js'
}, {
format: 'es',
sourcemap: true,
file: 'dist/field-parser.es.js'
}]
};
'use strict';
const assert = require('assert');
require('babel-register');
const parse = require('../index').default;
const mark = require('../index').mark;
const parse = require('../').default;
const mark = require('../').mark;

@@ -8,0 +7,0 @@ describe('Field parser', () => {

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