$ npm install delimiters
Set and get custom template delimiters.
npm i delimiters --save
var delimiters = require('delimiters');
Create a new instance of Delimiters
, optionally passing default options
to use.
options
{Object}: Options to use.Example:
var Delimiters = require('delimiters');
var delimiters = new Delimiters();
Pass custom delimiters to Lo-Dash.
arr
{Array}: Array of delimiters.settings
{Object}: Override specific generated delimiters with custom values.Example:
delims.makeDelims(['${', '}'], {
// override the generated regex
interpolate: /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g
});
Cache delimiters by ext
with the given options
for later use.
ext
{String}: The name to use for the stored delimiters.arr
{Array}: Array of delimiter strings.Example:
delims.setDelims('curly', ['{%', '%}']);
delims.setDelims('angle', ['<%', '%>']);
delims.setDelims('es6', ['${', '}'], {
// override the generated regex
interpolate: /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g
});
Specify by ext
the delimiters to make active.
ext
{String}delimiters.useDelims('curly');
delimiters.useDelims('angle');
Jon Schlinkert
Copyright (c) 2014-2015 Jon Schlinkert
Released under the MIT license
This file was generated by verb on February 02, 2015.
© 2010 - cnpmjs.org x YWFE | Home | YWFE