liquidless-faker
Advanced tools
Comparing version 1.0.0 to 1.0.1
import { FilterFunction } from 'liquidless/dist/filters'; | ||
export declare const faker: FilterFunction; | ||
export declare const fake: FilterFunction; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.faker = void 0; | ||
exports.fake = void 0; | ||
const faker_1 = require("@faker-js/faker"); | ||
const faker = (value, args, variable) => { | ||
const fake = (value, args, variable) => { | ||
const [module, type] = variable.split('.'); | ||
return faker_1.faker[module][type](args); | ||
}; | ||
exports.faker = faker; | ||
exports.fake = fake; |
{ | ||
"name": "liquidless-faker", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Faker.js filter for liquidless templates", | ||
@@ -28,5 +28,4 @@ "main": "dist/index.js", | ||
"@tsconfig/node16": "^1.0.3", | ||
"@types/flat": "^5.0.2", | ||
"@types/node": "^18.7.18", | ||
"liquidless": "^1.0.5", | ||
"liquidless": "^1.0.8", | ||
"ts-node": "^10.9.1", | ||
@@ -33,0 +32,0 @@ "typescript": "^4.8.3" |
@@ -13,6 +13,6 @@ # liquidless-faker | ||
Import the `faker` function | ||
Import the `fake` filter | ||
```js | ||
import { faker } from 'liquidless-faker' | ||
import { fake } from 'liquidless-faker' | ||
``` | ||
@@ -25,5 +25,5 @@ | ||
```js | ||
renderTemplate('{{ lorem.lines | faker: 1 }}', {}, { | ||
renderTemplate('{{ lorem.lines | fake: 1 }}', {}, { | ||
filters: { | ||
faker | ||
fake | ||
} | ||
@@ -30,0 +30,0 @@ }) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5
2947