Security News
NVD Backlog Tops 20,000 CVEs Awaiting Analysis as NIST Prepares System Updates
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
load-templates
Advanced tools
Load templates.
Install with npm
$ npm i load-templates --save
var Loader = require('load-templates');
var loader = new Loader();
Pass a string or array of globs or file paths, or an object to the load method:
loader.load('a.md', {a: 'b'});
loader.load('*.md', {a: 'b'});
loader.load(['*.md'], {a: 'b'});
loader.load({path: 'a.md', a: 'b'});
loader.load({'a.md': {path: 'a.md', a: 'b'}});
And get shiny, normalized template objects back:
{ 'a.md': {path: 'a.md', content: 'this is content.', a: 'b'},
'b.md': {path: 'b.md', content: 'this is content.', a: 'b'},
'c.md': {path: 'c.md', content: 'this is content.', a: 'b'}}
Type: Boolean
Default: undefined
When false
paths will not be made relative to the current working directory.
See the docs and tests for valid formats. WIP.
-------------------|-----------|-----------|-----------|-----------|
File | % Stmts |% Branches | % Funcs | % Lines |
-------------------|-----------|-----------|-----------|-----------|
load-templates/ | 98.65 | 95.06 | 100 | 98.61 |
index.js | 98.65 | 95.06 | 100 | 98.61 |
-------------------|-----------|-----------|-----------|-----------|
All files | 98.65 | 95.06 | 100 | 98.61 |
-------------------|-----------|-----------|-----------|-----------|
Install dev dependencies:
$ npm i -d && npm test
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Jon Schlinkert
Copyright © 2014-2015 Jon Schlinkert Released under the MIT license.
This file was generated by verb-cli on July 26, 2015.
FAQs
Load templates/views using globs, file paths, objects, arrays, or key-value pairs.
The npm package load-templates receives a total of 45,309 weekly downloads. As such, load-templates popularity was classified as popular.
We found that load-templates demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.