Npm Package for convert normal string to alay letter.
const alay = require('alay-letter');
console.log(alay('Hello World'));
| const Sequelize = require('sequelize'); | |
| const sequelize = new Sequelize('database', 'username', 'password', { | |
| host: 'localhost', | |
| dialect: 'mysql'|'sqlite'|'postgres'|'mssql', | |
| pool: { | |
| max: 5, | |
| min: 0, | |
| acquire: 30000, | |
| idle: 10000 |
| //ini sama aja dengan "SELECT * FROM flight" | |
| $flights = App\Flight::all(); | |
| //ini sama aja dengan "SELECT * FROM flight WHERE id = 1" | |
| $flight = App\Flight::find(1); | |
| //ini sama aja dengan "SELECT * FROM flight WHERE active = 1 LIMIT 1" | |
| $flight = App\Flight::where('active', 1)->first(); |
| //ini sama dengan "SELECT * FROM flight WHERE id = 123" | |
| Flight.findById(123).then(project => { | |
| }) | |
| //ini sama dengan "SELECT * FROM flight" | |
| Flight.all().then(projects => { | |
| }) |
| const alayConverter = function(string) { | |
| let newString = ''; | |
| for (var i = 0, len = string.length; i < len; i++) { | |
| if (string[i] == 'a') { | |
| newString += '4'; | |
| } else if (string[i] == 's') { | |
| newString += '5'; | |
| } else if (string[i] == 'e') { | |
| newString += '3'; | |
| } else if (string[i] == 'o') { |
| const alay = require('./index'); | |
| console.log(alay('hello world'); |
| const car = { | |
| color: 'red', | |
| racingCar: true, | |
| type: 'suv' | |
| engineStart: () => { | |
| console.log('engine start') | |
| } | |
| } | |
| class Car { | |
| constructor(type, color) { | |
| this.type = type | |
| this.color = color | |
| this.engineStatus = 'off' | |
| } | |
| engineStart () { | |
| class Car { | |
| constructor() { | |
| this._color = null | |
| } | |
| get color () { | |
| return `Warna Mobilnya adalah ${this._color}` | |
| } |
| class Car { | |
| constructor(color) { | |
| this.color = color | |
| } | |
| } | |
| const car = new Car('merah') | |
| console.log(car.color) |